mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 04:03:29 +00:00
Add test for DDG
This commit is contained in:
@@ -121,6 +121,16 @@ describe("Browser Utils Service", () => {
|
||||
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.VivaldiExtension);
|
||||
});
|
||||
|
||||
it("should detect duckduckgo", () => {
|
||||
Object.defineProperty(navigator, "userAgent", {
|
||||
configurable: true,
|
||||
value:
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15 Ddg/18.4",
|
||||
});
|
||||
|
||||
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.DuckDuckGoExtension);
|
||||
});
|
||||
|
||||
it("returns a previously determined device using a cached value", () => {
|
||||
Object.defineProperty(navigator, "userAgent", {
|
||||
configurable: true,
|
||||
|
||||
Reference in New Issue
Block a user