mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
LibJS: Add DisposableStack{, Prototype, Constructor}
Since the async parts of the spec are not stage 3 at this point we don't add AsyncDisposableStack.
This commit is contained in:
parent
bff038411a
commit
6255ca4a42
22 changed files with 868 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
test("constructor properties", () => {
|
||||
expect(DisposableStack).toHaveLength(0);
|
||||
expect(DisposableStack.name).toBe("DisposableStack");
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("called without new", () => {
|
||||
expect(() => {
|
||||
DisposableStack();
|
||||
}).toThrowWithMessage(TypeError, "DisposableStack constructor must be called with 'new'");
|
||||
});
|
||||
});
|
||||
|
||||
describe("normal behavior", () => {
|
||||
test("typeof", () => {
|
||||
expect(typeof new DisposableStack()).toBe("object");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue