1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-29 07:59:42 +01:00
bitwarden-browser/libs/common/spec/models/view/folderView.spec.ts

23 lines
564 B
TypeScript

import { FolderView } from "@bitwarden/common/models/view/folder.view";
describe("FolderView", () => {
describe("fromJSON", () => {
it("initializes nested objects", () => {
const revisionDate = new Date("2022-08-04T01:06:40.441Z");
const actual = FolderView.fromJSON({
revisionDate: revisionDate.toISOString(),
name: "name",
id: "id",
});
const expected = {
revisionDate: revisionDate,
name: "name",
id: "id",
};
expect(actual).toMatchObject(expected);
});
});
});