summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/070_location.ts.out23
-rw-r--r--cli/tests/unit/url_test.ts32
2 files changed, 28 insertions, 27 deletions
diff --git a/cli/tests/070_location.ts.out b/cli/tests/070_location.ts.out
index 2ba0f259d..3c08d53fc 100644
--- a/cli/tests/070_location.ts.out
+++ b/cli/tests/070_location.ts.out
@@ -1,20 +1,15 @@
[WILDCARD][Function: Location]
Location { [Symbol(Symbol.toStringTag)]: "Location" }
Location {
- hash: [Getter/Setter],
- host: [Getter/Setter],
- hostname: [Getter/Setter],
- href: [Getter/Setter],
- origin: [Getter],
- pathname: [Getter/Setter],
- port: [Getter/Setter],
- protocol: [Getter/Setter],
- search: [Getter/Setter],
- ancestorOrigins: [Getter],
- assign: [Function: assign],
- reload: [Function: reload],
- replace: [Function: replace],
- toString: [Function: toString]
+ hash: "#bat",
+ host: "foo",
+ hostname: "foo",
+ href: "https://foo/bar?baz#bat",
+ origin: "https://foo",
+ pathname: "/bar",
+ port: "",
+ protocol: "https:",
+ search: "?baz"
}
NotSupportedError: Cannot set "location.hostname".
[WILDCARD]
diff --git a/cli/tests/unit/url_test.ts b/cli/tests/unit/url_test.ts
index 40e641978..b8c4bb831 100644
--- a/cli/tests/unit/url_test.ts
+++ b/cli/tests/unit/url_test.ts
@@ -387,19 +387,25 @@ unitTest(function sortingNonExistentParamRemovesQuestionMarkFromURL(): void {
assertEquals(url.search, "");
});
-unitTest(
- {
- // FIXME(bartlomieju)
- ignore: true,
- },
- function customInspectFunction(): void {
- const url = new URL("http://example.com/?");
- assertEquals(
- Deno.inspect(url),
- 'URL { href: "http://example.com/?", origin: "http://example.com", protocol: "http:", username: "", password: "", host: "example.com", hostname: "example.com", port: "", pathname: "/", hash: "", search: "?" }',
- );
- },
-);
+unitTest(function customInspectFunction(): void {
+ const url = new URL("http://example.com/?");
+ assertEquals(
+ Deno.inspect(url),
+ `URL {
+ href: "http://example.com/?",
+ origin: "http://example.com",
+ protocol: "http:",
+ username: "",
+ password: "",
+ host: "example.com",
+ hostname: "example.com",
+ port: "",
+ pathname: "/",
+ hash: "",
+ search: "?"
+}`,
+ );
+});
unitTest(function protocolNotHttpOrFile() {
const url = new URL("about:blank");