mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-12 01:48:21 +02:00
* Create sessions sync structure * Add observing to session-syncer * Do not run syncer logic in decorator tests * Extract test constants * Change Observables to BehaviorSubject * Move sendMessage to static method in BrowserApi * Implement session sync * only watch in manifest v3 * Use session sync on folder service * Add array observable sync * Bypass cache on update from message * Create feature and dev flags for browser * Protect development-only methods with decorator * Improve todo comments for long-term residency * Use class properties in init * Do not reuse mocks * Use json (de)serialization patterns * Fix failing session storage in dev environment * Split up complex EncString constructor * Default false for decrypted session storage * Try removing hydrate EncString method * PR review * PR test review
23 lines
563 B
TypeScript
23 lines
563 B
TypeScript
import { FolderView } from "@bitwarden/common/models/view/folderView";
|
|
|
|
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);
|
|
});
|
|
});
|
|
});
|