mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-05 07:40:58 +00:00
19 lines
515 B
JavaScript
19 lines
515 B
JavaScript
|
|
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");
|
||
|
|
});
|
||
|
|
});
|