1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[EC-582] Add domain object serialization (#3623)

This commit is contained in:
Thomas Rittson
2022-10-04 06:50:43 +10:00
committed by GitHub
parent cb7b8313a4
commit 162db0b600
25 changed files with 513 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ import { FolderData } from "@bitwarden/common/models/data/folderData";
import { EncString } from "@bitwarden/common/models/domain/encString";
import { Folder } from "@bitwarden/common/models/domain/folder";
import { mockEnc } from "../../utils";
import { mockEnc, mockFromJson } from "../../utils";
describe("Folder", () => {
let data: FolderData;
@@ -42,7 +42,6 @@ describe("Folder", () => {
describe("fromJSON", () => {
jest.mock("@bitwarden/common/models/domain/encString");
const mockFromJson = (stub: any) => (stub + "_fromJSON") as any;
jest.spyOn(EncString, "fromJSON").mockImplementation(mockFromJson);
it("initializes nested objects", () => {