mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[PM-5606] Add reactive generator service (#7446)
This commit is contained in:
49
libs/common/src/tools/generator/key-definition.spec.ts
Normal file
49
libs/common/src/tools/generator/key-definition.spec.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import {
|
||||
ENCRYPTED_HISTORY,
|
||||
ENCRYPTED_USERNAME_SETTINGS,
|
||||
PASSPHRASE_SETTINGS,
|
||||
PASSWORD_SETTINGS,
|
||||
PLAINTEXT_USERNAME_SETTINGS,
|
||||
} from "./key-definitions";
|
||||
|
||||
describe("Key definitions", () => {
|
||||
describe("PASSWORD_SETTINGS", () => {
|
||||
it("should pass through deserialization", () => {
|
||||
const value = {};
|
||||
const result = PASSWORD_SETTINGS.deserializer(value);
|
||||
expect(result).toBe(value);
|
||||
});
|
||||
});
|
||||
|
||||
describe("PASSPHRASE_SETTINGS", () => {
|
||||
it("should pass through deserialization", () => {
|
||||
const value = {};
|
||||
const result = PASSPHRASE_SETTINGS.deserializer(value);
|
||||
expect(result).toBe(value);
|
||||
});
|
||||
});
|
||||
|
||||
describe("ENCRYPTED_USERNAME_SETTINGS", () => {
|
||||
it("should pass through deserialization", () => {
|
||||
const value = {};
|
||||
const result = ENCRYPTED_USERNAME_SETTINGS.deserializer(value);
|
||||
expect(result).toBe(value);
|
||||
});
|
||||
});
|
||||
|
||||
describe("PLAINTEXT_USERNAME_SETTINGS", () => {
|
||||
it("should pass through deserialization", () => {
|
||||
const value = {};
|
||||
const result = PLAINTEXT_USERNAME_SETTINGS.deserializer(value);
|
||||
expect(result).toBe(value);
|
||||
});
|
||||
});
|
||||
|
||||
describe("ENCRYPTED_HISTORY", () => {
|
||||
it("should pass through deserialization", () => {
|
||||
const value = {};
|
||||
const result = ENCRYPTED_HISTORY.deserializer(value as any);
|
||||
expect(result).toBe(value);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user