1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[PM-9613] port forwarders to integrations (#10075)

* introduced forwarder integrations
* simply contexts
* report error and message when both are present in an RPC response
This commit is contained in:
✨ Audrey ✨
2024-07-30 08:40:52 -04:00
committed by GitHub
parent 8f437dc773
commit 8c78959aaf
70 changed files with 2392 additions and 2415 deletions

View File

@@ -1,15 +1,19 @@
import { mock } from "jest-mock-extended";
import { Jsonify } from "type-fest";
import { GENERATOR_DISK, UserKeyDefinitionOptions } from "../../platform/state";
import { SecretClassifier } from "./secret-classifier";
import { Classifier } from "./classifier";
import { SecretKeyDefinition } from "./secret-key-definition";
describe("SecretKeyDefinition", () => {
const classifier = SecretClassifier.allSecret<{ foo: boolean }>();
type TestData = { foo: boolean };
const classifier = mock<Classifier<any, Record<string, never>, TestData>>();
const options: UserKeyDefinitionOptions<any> = { deserializer: (v: any) => v, clearOn: [] };
it("toEncryptedStateKey returns a key", () => {
const expectedOptions: UserKeyDefinitionOptions<any> = {
deserializer: (v: any) => v,
const expectedOptions: UserKeyDefinitionOptions<TestData> = {
deserializer: (v: Jsonify<TestData>) => v,
cleanupDelayMs: 100,
clearOn: ["logout", "lock"],
};