ladybird/Libraries/LibJS/Tests/builtins/AsyncDisposableStack/AsyncDisposableStack.js

22 lines
579 B
JavaScript
Raw Normal View History

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");
});
});