2025-01-17 12:09:01 -03:00
|
|
|
test("constructor properties", () => {
|
|
|
|
|
expect(AsyncDisposableStack).toHaveLength(0);
|
|
|
|
|
expect(AsyncDisposableStack.name).toBe("AsyncDisposableStack");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("errors", () => {
|
|
|
|
|
test("called without new", () => {
|
|
|
|
|
expect(() => {
|
|
|
|
|
AsyncDisposableStack();
|
2025-10-31 12:50:48 -03:00
|
|
|
}).toThrowWithMessage(TypeError, "AsyncDisposableStack constructor must be called with 'new'");
|
2025-01-17 12:09:01 -03:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("normal behavior", () => {
|
|
|
|
|
test("typeof", () => {
|
|
|
|
|
expect(typeof new AsyncDisposableStack()).toBe("object");
|
|
|
|
|
});
|
|
|
|
|
});
|