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:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user