Skip to content

Commit 9e3865a

Browse files
committed
test(web): simplify usage hub preservation assertions
1 parent ca45b61 commit 9e3865a

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

‎apps/web/src/components/settings/AddUsageLimitSourceDialog.logic.test.ts‎

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,15 @@ describe("adding usage limit sources", () => {
2323
},
2424
});
2525
}
26-
expect(Object.values(settings.usageLimitSources)).toEqual([
27-
{
28-
kind: "cliproxy",
29-
url: firstUrl,
30-
label: "First hub",
31-
managementKey: "first-key",
32-
enabled: true,
33-
},
34-
{
26+
expect(Object.values(settings.usageLimitSources)).toEqual(
27+
sources.map(([url, label, managementKey]) => ({
3528
kind: "cliproxy",
36-
url: secondUrl,
37-
label: "Second hub",
38-
managementKey: "second-key",
29+
url,
30+
label,
31+
managementKey,
3932
enabled: true,
40-
},
41-
{
42-
kind: "cliproxy",
43-
url: `${secondUrl}/extra`,
44-
label: "Third hub",
45-
managementKey: "third-key",
46-
enabled: true,
47-
},
48-
]);
33+
})),
34+
);
4935
});
5036

5137
it("updates a saved hub when its URL is added again", () => {

0 commit comments

Comments
 (0)