Skip to content

Commit d4ebb74

Browse files
Update flag tests
1 parent b9737d1 commit d4ebb74

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/workbench/flags.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ describe("flags", () => {
1414
expect(flags.dndDebug).toEqual(false);
1515
});
1616

17-
it("enables nothing in production", () => {
17+
it("only enables PWA in production", () => {
1818
const params = new URLSearchParams([]);
1919

2020
const flags = flagsForParams("PRODUCTION", params);
2121

22-
expect(Object.values(flags).every((x) => !x)).toEqual(true);
22+
expect(flags.pwa).toBe(true);
23+
const { pwa, ...filteredFlags } = flags;
24+
25+
expect(Object.values(filteredFlags).every((x) => !x)).toEqual(true);
2326
});
2427

2528
it("enable specific flag", () => {
@@ -29,7 +32,7 @@ describe("flags", () => {
2932

3033
expect(
3134
Object.entries(flags).every(
32-
([flag, status]) => (flag === "noWelcome") === status
35+
([flag, status]) => (flag === "noWelcome" || flag === "pwa") === status
3336
)
3437
).toEqual(true);
3538
});

0 commit comments

Comments
 (0)