mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
fix test
This commit is contained in:
@@ -351,6 +351,8 @@ function testHmacFast(algorithm: 'sha1' | 'sha256' | 'sha512', mac: string) {
|
|||||||
function getWebCryptoFunctionService() {
|
function getWebCryptoFunctionService() {
|
||||||
const platformUtilsMock = TypeMoq.Mock.ofType<PlatformUtilsService>(PlatformUtilsServiceMock);
|
const platformUtilsMock = TypeMoq.Mock.ofType<PlatformUtilsService>(PlatformUtilsServiceMock);
|
||||||
platformUtilsMock.setup((x) => x.isEdge()).returns(() => navigator.userAgent.indexOf(' Edge/') !== -1);
|
platformUtilsMock.setup((x) => x.isEdge()).returns(() => navigator.userAgent.indexOf(' Edge/') !== -1);
|
||||||
|
platformUtilsMock.setup((x) => x.isIE()).returns(() => navigator.userAgent.indexOf(' Edge/') === -1 &&
|
||||||
|
navigator.userAgent.indexOf(' Trident/') !== -1);
|
||||||
return new WebCryptoFunctionService(window, platformUtilsMock.object);
|
return new WebCryptoFunctionService(window, platformUtilsMock.object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,4 +366,5 @@ function makeStaticByteArray(length: number) {
|
|||||||
|
|
||||||
class PlatformUtilsServiceMock extends PlatformUtilsService {
|
class PlatformUtilsServiceMock extends PlatformUtilsService {
|
||||||
isEdge = () => false;
|
isEdge = () => false;
|
||||||
|
isIE = () => false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user