diff options
Diffstat (limited to 'test/bun.js/web-globals.test.js')
-rw-r--r-- | test/bun.js/web-globals.test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bun.js/web-globals.test.js b/test/bun.js/web-globals.test.js index c5740b0fc..70c2f01e5 100644 --- a/test/bun.js/web-globals.test.js +++ b/test/bun.js/web-globals.test.js @@ -96,3 +96,12 @@ it("crypto.randomUUID", () => { expect(uuid2[23]).toBe("-"); } }); + +it("URL.prototype.origin", () => { + const url = new URL("https://html.spec.whatwg.org/"); + const { origin, host, hostname } = url; + + expect(hostname).toBe("html.spec.whatwg.org"); + expect(host).toBe("html.spec.whatwg.org"); + expect(origin).toBe("https://html.spec.whatwg.org"); +}); |