mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-1426] Refactor uri matching (#5003)
* Move URI matching logic into uriView * Fix url parsing: always assign default protocol, otherwise no protocol with port is parsed incorrectly * Codescene: refactor domain matching logic
This commit is contained in:
@@ -346,4 +346,14 @@ describe("Utils Service", () => {
|
||||
).toBe("api/sends/access/sendkey");
|
||||
});
|
||||
});
|
||||
|
||||
describe("getUrl", () => {
|
||||
it("assumes a http protocol if no protocol is specified", () => {
|
||||
const urlString = "www.exampleapp.com.au:4000";
|
||||
|
||||
const actual = Utils.getUrl(urlString);
|
||||
|
||||
expect(actual.protocol).toBe("http:");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user