mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
18 lines
529 B
JavaScript
18 lines
529 B
JavaScript
test("basic functionality", () => {
|
|
expect(Error).toHaveLength(1);
|
|
expect(Error.name).toBe("Error");
|
|
});
|
|
|
|
test("name", () => {
|
|
[Error(), Error(undefined), Error("test"), Error(42), Error(null)].forEach(error => {
|
|
expect(error.name).toBe("Error");
|
|
});
|
|
});
|
|
|
|
test("message", () => {
|
|
expect(Error().message).toBe("");
|
|
expect(Error(undefined).message).toBe("");
|
|
expect(Error("test").message).toBe("test");
|
|
expect(Error(42).message).toBe("42");
|
|
expect(Error(null).message).toBe("null");
|
|
});
|