1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-16 10:45:20 +01:00

fix tests imports

This commit is contained in:
Jacob Fink 2023-06-20 10:06:02 -04:00
parent ef8db575a9
commit a8f1e7858d
No known key found for this signature in database
GPG Key ID: C2F7ACF05859D008
3 changed files with 11 additions and 11 deletions

View File

@ -1,18 +1,18 @@
import { mock, MockProxy } from "jest-mock-extended"; import { mock, MockProxy } from "jest-mock-extended";
import { ApiService } from "../../abstractions/api.service"; import { ApiService } from "../../abstractions/api.service";
import { AppIdService } from "../../abstractions/appId.service"; import { AppIdService } from "../../platform/abstractions/app-id.service";
import { CryptoService } from "../../abstractions/crypto.service"; import { CryptoService } from "../../platform/abstractions/crypto.service";
import { LogService } from "../../abstractions/log.service"; import { LogService } from "../../platform/abstractions/log.service";
import { MessagingService } from "../../abstractions/messaging.service"; import { MessagingService } from "../../platform/abstractions/messaging.service";
import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service";
import { StateService } from "../../abstractions/state.service"; import { StateService } from "../../platform/abstractions/state.service";
import { Utils } from "../../misc/utils"; import { Utils } from "../../platform/misc/utils";
import { import {
MasterKey, MasterKey,
SymmetricCryptoKey, SymmetricCryptoKey,
UserSymKey, UserSymKey,
} from "../../models/domain/symmetric-crypto-key"; } from "../../platform/models/domain/symmetric-crypto-key";
import { CsprngArray } from "../../types/csprng"; import { CsprngArray } from "../../types/csprng";
import { TokenService } from "../abstractions/token.service"; import { TokenService } from "../abstractions/token.service";
import { TwoFactorService } from "../abstractions/two-factor.service"; import { TwoFactorService } from "../abstractions/two-factor.service";

View File

@ -230,7 +230,7 @@ describe("EncString", () => {
}); });
it("gets an organization key if required", async () => { it("gets an organization key if required", async () => {
const orgKey = mock<SymmetricCryptoKey>() as OrgKey; const orgKey = mock<OrgKey>();
cryptoService.getOrgKey.calledWith("orgId").mockResolvedValue(orgKey); cryptoService.getOrgKey.calledWith("orgId").mockResolvedValue(orgKey);

View File

@ -4,7 +4,7 @@ import { makeStaticByteArray, mockEnc, mockFromJson } from "../../../../spec";
import { CryptoService } from "../../../platform/abstractions/crypto.service"; import { CryptoService } from "../../../platform/abstractions/crypto.service";
import { EncryptService } from "../../../platform/abstractions/encrypt.service"; import { EncryptService } from "../../../platform/abstractions/encrypt.service";
import { EncryptedString, EncString } from "../../../platform/models/domain/enc-string"; import { EncryptedString, EncString } from "../../../platform/models/domain/enc-string";
import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { OrgKey, SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key";
import { ContainerService } from "../../../platform/services/container.service"; import { ContainerService } from "../../../platform/services/container.service";
import { AttachmentData } from "../../models/data/attachment.data"; import { AttachmentData } from "../../models/data/attachment.data";
import { Attachment } from "../../models/domain/attachment"; import { Attachment } from "../../models/domain/attachment";
@ -110,7 +110,7 @@ describe("Attachment", () => {
}); });
it("gets an organization key if required", async () => { it("gets an organization key if required", async () => {
const orgKey = mock<SymmetricCryptoKey>(); const orgKey = mock<OrgKey>();
cryptoService.getOrgKey.calledWith("orgId").mockResolvedValue(orgKey); cryptoService.getOrgKey.calledWith("orgId").mockResolvedValue(orgKey);
await attachment.decrypt("orgId", null); await attachment.decrypt("orgId", null);