aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorchenchao <wenbushi@gmail.com>2019-11-07 11:14:03 +0800
committerchenchao <wenbushi@gmail.com>2019-11-07 11:14:03 +0800
commitddd3b08a4a3b393375b6e9716697b9442fcfa66d (patch)
treeaf7e201cd967a4268822f8794955d819a6eff259 /test
parentf3ce1c300a79fab2f87c38cd853477e7756edb55 (diff)
handle localhost urls with path
Diffstat (limited to 'test')
-rw-r--r--test/shared/urls.test.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/shared/urls.test.ts b/test/shared/urls.test.ts
index d6f0550..6206d03 100644
--- a/test/shared/urls.test.ts
+++ b/test/shared/urls.test.ts
@@ -41,13 +41,15 @@ describe("shared/commands/parsers", () => {
expect(parsers.searchUrl('localhost', config))
.to.equal('http://localhost');
expect(parsers.searchUrl('http://localhost', config))
- .to.equal('http://localhost');
+ .to.equal('http://localhost/');
expect(parsers.searchUrl('localhost:8080', config))
- .to.equal('http://locahost:8080');
+ .to.equal('http://localhost:8080');
expect(parsers.searchUrl('localhost:80nan', config))
- .to.equal('https://google.com/search?q=localhost:80nan');
+ .to.equal('https://google.com/search?q=localhost%3A80nan');
expect(parsers.searchUrl('localhost 8080', config))
.to.equal('https://google.com/search?q=localhost%208080');
+ expect(parsers.searchUrl('localhost:80/build', config))
+ .to.equal('http://localhost:80/build')
})
});