From bfaebb6b92924046dc83b49fc2d5c7fbcc4a08c4 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 7 Jun 2018 23:58:19 -0400 Subject: [PATCH] fix test --- spec/web/services/webCryptoFunction.service.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/web/services/webCryptoFunction.service.spec.ts b/spec/web/services/webCryptoFunction.service.spec.ts index 0d2b21d0eb2..ca517eaec25 100644 --- a/spec/web/services/webCryptoFunction.service.spec.ts +++ b/spec/web/services/webCryptoFunction.service.spec.ts @@ -351,6 +351,8 @@ function testHmacFast(algorithm: 'sha1' | 'sha256' | 'sha512', mac: string) { function getWebCryptoFunctionService() { const platformUtilsMock = TypeMoq.Mock.ofType(PlatformUtilsServiceMock); 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); } @@ -364,4 +366,5 @@ function makeStaticByteArray(length: number) { class PlatformUtilsServiceMock extends PlatformUtilsService { isEdge = () => false; + isIE = () => false; }