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

Add a key definition for providers (#7915)

This commit is contained in:
Addison Beck
2024-02-13 06:27:52 -06:00
committed by GitHub
parent b64650ad9e
commit a9297af2d3
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { ProviderUserStatusType, ProviderUserType } from "../enums";
import { ProviderData } from "../models/data/provider.data";
import { PROVIDERS } from "./provider.service";
describe("PROVIDERS key definition", () => {
const sut = PROVIDERS;
it("should deserialize to a proper ProviderData object", async () => {
const expectedResult: Record<string, ProviderData> = {
"1": {
id: "string",
name: "string",
status: ProviderUserStatusType.Accepted,
type: ProviderUserType.ServiceUser,
enabled: true,
userId: "string",
useEvents: true,
},
};
const result = sut.deserializer(JSON.parse(JSON.stringify(expectedResult)));
expect(result).toEqual(expectedResult);
});
});