Skip to content

Commit a84f7d6

Browse files
committed
build fixes
1 parent 94246f7 commit a84f7d6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

libs/auth/src/common/services/auth-request/auth-request.service.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ describe("AuthRequestService", () => {
146146
);
147147

148148
// Assert
149-
expect(sut.decryptPubKeyEncryptedUserKey).toBeCalledWith(
149+
expect(sut.decryptPubKeyEncryptedUserKey).toHaveBeenCalledWith(
150150
mockAuthReqResponse.key,
151151
mockPrivateKey,
152152
);
153-
expect(keyService.setUserKey).toBeCalledWith(mockDecryptedUserKey, mockUserId);
153+
expect(keyService.setUserKey).toHaveBeenCalledWith(mockDecryptedUserKey, mockUserId);
154154
});
155155
});
156156

@@ -186,7 +186,7 @@ describe("AuthRequestService", () => {
186186
);
187187

188188
// Assert
189-
expect(sut.decryptPubKeyEncryptedMasterKeyAndHash).toBeCalledWith(
189+
expect(sut.decryptPubKeyEncryptedMasterKeyAndHash).toHaveBeenCalledWith(
190190
mockAuthReqResponse.key,
191191
mockAuthReqResponse.masterPasswordHash,
192192
mockPrivateKey,
@@ -226,7 +226,7 @@ describe("AuthRequestService", () => {
226226
);
227227

228228
// Assert
229-
expect(encryptService.decapsulateKeyUnsigned).toBeCalledWith(
229+
expect(encryptService.decapsulateKeyUnsigned).toHaveBeenCalledWith(
230230
new EncString(mockPubKeyEncryptedUserKey),
231231
mockPrivateKey,
232232
);

libs/common/src/key-management/crypto/models/enc-string.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe("EncString", () => {
107107

108108
it("result should be cached", async () => {
109109
const decrypted = await encString.decrypt(null);
110-
expect(encryptService.decryptString).toBeCalledTimes(1);
110+
expect(encryptService.decryptString).toHaveBeenCalledTimes(1);
111111

112112
expect(decrypted).toBe("decrypted");
113113
});

libs/state/src/state-migrations/migration-builder.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,46 +91,46 @@ describe("MigrationBuilder", () => {
9191
const helper = new MigrationHelper(0, mock(), mock(), "general", clientType);
9292
const spy = jest.spyOn(migrator, "migrate");
9393
await sut.migrate(helper);
94-
expect(spy).toBeCalledWith(helper);
94+
expect(spy).toHaveBeenCalledWith(helper);
9595
});
9696

9797
it("should rollback", async () => {
9898
const helper = new MigrationHelper(1, mock(), mock(), "general", clientType);
9999
const spy = jest.spyOn(rollback_migrator, "rollback");
100100
await sut.migrate(helper);
101-
expect(spy).toBeCalledWith(helper);
101+
expect(spy).toHaveBeenCalledWith(helper);
102102
});
103103

104104
it("should update version on migrate", async () => {
105105
const helper = new MigrationHelper(0, mock(), mock(), "general", clientType);
106106
const spy = jest.spyOn(migrator, "updateVersion");
107107
await sut.migrate(helper);
108-
expect(spy).toBeCalledWith(helper, "up");
108+
expect(spy).toHaveBeenCalledWith(helper, "up");
109109
});
110110

111111
it("should update version on rollback", async () => {
112112
const helper = new MigrationHelper(1, mock(), mock(), "general", clientType);
113113
const spy = jest.spyOn(rollback_migrator, "updateVersion");
114114
await sut.migrate(helper);
115-
expect(spy).toBeCalledWith(helper, "down");
115+
expect(spy).toHaveBeenCalledWith(helper, "down");
116116
});
117117

118118
it("should not run the migrator if the current version does not match the from version", async () => {
119119
const helper = new MigrationHelper(3, mock(), mock(), "general", clientType);
120120
const migrate = jest.spyOn(migrator, "migrate");
121121
const rollback = jest.spyOn(rollback_migrator, "rollback");
122122
await sut.migrate(helper);
123-
expect(migrate).not.toBeCalled();
124-
expect(rollback).not.toBeCalled();
123+
expect(migrate).not.toHaveBeenCalled();
124+
expect(rollback).not.toHaveBeenCalled();
125125
});
126126

127127
it("should not update version if the current version does not match the from version", async () => {
128128
const helper = new MigrationHelper(3, mock(), mock(), "general", clientType);
129129
const migrate = jest.spyOn(migrator, "updateVersion");
130130
const rollback = jest.spyOn(rollback_migrator, "updateVersion");
131131
await sut.migrate(helper);
132-
expect(migrate).not.toBeCalled();
133-
expect(rollback).not.toBeCalled();
132+
expect(migrate).not.toHaveBeenCalled();
133+
expect(rollback).not.toHaveBeenCalled();
134134
});
135135
});
136136

libs/state/src/state-migrations/migrator.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("migrator default methods", () => {
6060
describe("up", () => {
6161
it("should update the version", async () => {
6262
await sut.updateVersion(helper, "up");
63-
expect(storage.save).toBeCalledWith("stateVersion", 1);
63+
expect(storage.save).toHaveBeenCalledWith("stateVersion", 1);
6464
expect(helper.currentVersion).toBe(1);
6565
});
6666
});
@@ -69,7 +69,7 @@ describe("migrator default methods", () => {
6969
it("should update the version", async () => {
7070
helper.currentVersion = 1;
7171
await sut.updateVersion(helper, "down");
72-
expect(storage.save).toBeCalledWith("stateVersion", 0);
72+
expect(storage.save).toHaveBeenCalledWith("stateVersion", 0);
7373
expect(helper.currentVersion).toBe(0);
7474
});
7575
});

0 commit comments

Comments
 (0)