Files
ladybird/Tests/LibJS/Runtime/builtins/AsyncDisposableStack/AsyncDisposableStack.js
2026-01-22 07:46:48 -05:00

19 lines
545 B
JavaScript

test("constructor properties", () => {
expect(AsyncDisposableStack).toHaveLength(0);
expect(AsyncDisposableStack.name).toBe("AsyncDisposableStack");
});
describe("errors", () => {
test("called without new", () => {
expect(() => {
AsyncDisposableStack();
}).toThrowWithMessage(TypeError, "AsyncDisposableStack constructor must be called with 'new'");
});
});
describe("normal behavior", () => {
test("typeof", () => {
expect(typeof new AsyncDisposableStack()).toBe("object");
});
});