Skip to content

Commit c721359

Browse files
committed
fix: pattern test
1 parent 99fe6d0 commit c721359

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

TestRunner/app/tests/URLPattern.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe("URLPattern", function () {
33
it("throws on invalid URLPattern", function () {
44
var exceptionCaught = false;
55
try {
6-
const pattern = new URLPattern(null);
6+
const pattern = new URLPattern(1);
77
} catch (e) {
88
exceptionCaught = true;
99
}
@@ -22,7 +22,7 @@ describe("URLPattern", function () {
2222

2323
it("parses simple pattern", function () {
2424
const pattern = new URLPattern("https://example.com/books/:id");
25-
expect(pattern.protocol).toBe("https:");
25+
expect(pattern.protocol).toBe("https");
2626
expect(pattern.hostname).toBe("example.com");
2727
expect(pattern.pathname).toBe("/books/:id");
2828
expect(pattern.port).toBe("");
@@ -36,13 +36,13 @@ describe("URLPattern", function () {
3636

3737
it("parses with undefined base", function () {
3838
const pattern = new URLPattern("https://google.com", undefined);
39-
expect(pattern.protocol).toBe("https:");
39+
expect(pattern.protocol).toBe("https");
4040
expect(pattern.hostname).toBe("google.com");
4141
});
4242

4343
it("parses with null base", function () {
4444
const pattern = new URLPattern("https://google.com", null);
45-
expect(pattern.protocol).toBe("https:");
45+
expect(pattern.protocol).toBe("https");
4646
expect(pattern.hostname).toBe("google.com");
4747
});
4848

0 commit comments

Comments
 (0)