Skip to content

Commit

Permalink
Resolve merge errors in crypto service spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jlf0dev committed Aug 13, 2023
1 parent 2a8397e commit 93e3307
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions libs/common/src/platform/services/crypto.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("cryptoService", () => {
let stateSvcGetUserKey: jest.SpyInstance;

beforeEach(() => {
const mockRandomBytes = new Uint8Array(64).buffer as CsprngArray;
const mockRandomBytes = new Uint8Array(64) as CsprngArray;
mockUserKey = new SymmetricCryptoKey(mockRandomBytes) as UserKey;

stateSvcGetUserKey = jest.spyOn(stateService, "getUserKey");
Expand Down Expand Up @@ -87,9 +87,9 @@ describe("cryptoService", () => {
let stateSvcGetMasterKey: jest.SpyInstance;

beforeEach(() => {
const mockRandomBytes = new Uint8Array(64).buffer as CsprngArray;
const mockRandomBytes = new Uint8Array(64) as CsprngArray;
mockUserKey = new SymmetricCryptoKey(mockRandomBytes) as UserKey;
mockMasterKey = new SymmetricCryptoKey(new Uint8Array(64).buffer as CsprngArray) as MasterKey;
mockMasterKey = new SymmetricCryptoKey(new Uint8Array(64) as CsprngArray) as MasterKey;

stateSvcGetUserKey = jest.spyOn(stateService, "getUserKey");
stateSvcGetMasterKey = jest.spyOn(stateService, "getMasterKey");
Expand Down Expand Up @@ -121,7 +121,7 @@ describe("cryptoService", () => {
let mockUserKey: UserKey;

beforeEach(() => {
const mockRandomBytes = new Uint8Array(64).buffer as CsprngArray;
const mockRandomBytes = new Uint8Array(64) as CsprngArray;
mockUserKey = new SymmetricCryptoKey(mockRandomBytes) as UserKey;
});

Expand Down Expand Up @@ -163,9 +163,7 @@ describe("cryptoService", () => {

beforeEach(() => {
cryptoSvcMakePinKey = jest.spyOn(cryptoService, "makePinKey");
cryptoSvcMakePinKey.mockResolvedValue(
new SymmetricCryptoKey(new Uint8Array(64).buffer) as PinKey
);
cryptoSvcMakePinKey.mockResolvedValue(new SymmetricCryptoKey(new Uint8Array(64)) as PinKey);
encPin = new EncString(
"2.jcow2vTUePO+CCyokcIfVw==|DTBNlJ5yVsV2Bsk3UU3H6Q==|YvFBff5gxWqM+UsFB6BKimKxhC32AtjF3IStpU1Ijwg="
);
Expand Down

0 comments on commit 93e3307

Please sign in to comment.