Skip to content

Commit ae4ce37

Browse files
committed
Add a test for unsetting overrides store
1 parent 08d72d6 commit ae4ce37

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/client/eppo-client.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,5 +1134,19 @@ describe('EppoClient E2E test', () => {
11341134
// Should log the normal assignment
11351135
expect(td.explain(mockLogger.logAssignment).callCount).toBe(1);
11361136
});
1137+
1138+
it('reverts to normal assignment after unsetting overrides store', () => {
1139+
overrideStore.setEntries({
1140+
[flagKey]: {
1141+
key: 'override-variation',
1142+
value: 'override-value',
1143+
},
1144+
});
1145+
1146+
client.unsetOverridesStore();
1147+
1148+
const normalAssignment = client.getStringAssignment(flagKey, 'subject-10', {}, 'default');
1149+
expect(normalAssignment).toBe(variationA.value);
1150+
});
11371151
});
11381152
});

0 commit comments

Comments
 (0)