mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +00:00
LibJS: Implement Temporal.TimeZone.prototype.toString()
This commit is contained in:
parent
2e968700aa
commit
8d00504ff2
3 changed files with 51 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.TimeZone.prototype.toString).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const timeZone = new Temporal.TimeZone("UTC");
|
||||
expect(timeZone.toString()).toBe("UTC");
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.TimeZone object", () => {
|
||||
expect(() => {
|
||||
Temporal.TimeZone.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.TimeZone");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue