1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

Refactor for barrels. Utils service to jslib

This commit is contained in:
Kyle Spearrin
2018-01-06 22:13:48 -05:00
parent c018f096b4
commit 03258e50f7
56 changed files with 270 additions and 433 deletions

View File

@@ -1,5 +1,5 @@
import BrowserPlatformUtilsService from './browserPlatformUtils.service';
import { DeviceType } from '@bitwarden/jslib';
import { Enums } from '@bitwarden/jslib';
describe('Browser Utils Service', () => {
describe('getDomain', () => {
@@ -48,7 +48,7 @@ describe('Browser Utils Service', () => {
});
const browserPlatformUtilsService = new BrowserPlatformUtilsService();
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.Chrome);
expect(browserPlatformUtilsService.getDevice()).toBe(Enums.DeviceType.Chrome);
});
it('should detect firefox', () => {
@@ -58,7 +58,7 @@ describe('Browser Utils Service', () => {
});
const browserPlatformUtilsService = new BrowserPlatformUtilsService();
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.Firefox);
expect(browserPlatformUtilsService.getDevice()).toBe(Enums.DeviceType.Firefox);
});
it('should detect opera', () => {
@@ -68,7 +68,7 @@ describe('Browser Utils Service', () => {
});
const browserPlatformUtilsService = new BrowserPlatformUtilsService();
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.Opera);
expect(browserPlatformUtilsService.getDevice()).toBe(Enums.DeviceType.Opera);
});
it('should detect edge', () => {
@@ -78,7 +78,7 @@ describe('Browser Utils Service', () => {
});
const browserPlatformUtilsService = new BrowserPlatformUtilsService();
expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.Edge);
expect(browserPlatformUtilsService.getDevice()).toBe(Enums.DeviceType.Edge);
});
});
});