Skip to content

Commit

Permalink
Outline equal values issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NSeydoux committed Dec 9, 2024
1 parent 21dbc70 commit 973ae4c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/common/getters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,24 @@ describe("getters", () => {
expect(i).toEqual([1]);
});

it("does not collapse similar values", async () => {
const customFields = [
{
key: new URL("https://example.org/ns/customInt"),
value: [1, 1, 1],
},
];
const gConsentRequest = await mockGConsentRequest({
custom: customFields,
});
// This shows the typing of the return is correct.
const i: number[] = getCustomIntegers(
gConsentRequest,
new URL("https://example.org/ns/customInt"),
);
expect(i).toEqual([1, 1, 1]);
});

it("throws on mixed types", async () => {
const customFields = [
{
Expand Down

0 comments on commit 973ae4c

Please sign in to comment.