mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-29 07:59:42 +01:00
23 lines
564 B
TypeScript
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);
|
|
});
|
|
});
|
|
});
|