1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

Special Case 0 to mean no caching at all (#10221)

This commit is contained in:
Justin Baur
2024-07-23 07:58:59 -04:00
committed by GitHub
parent 2ea2045686
commit 477294379b
5 changed files with 37 additions and 12 deletions

View File

@@ -38,12 +38,12 @@ describe("KeyDefinition", () => {
expect(keyDefinition.cleanupDelayMs).toBe(500);
});
it.each([0, -1])("throws on 0 or negative (%s)", (testValue: number) => {
it("throws on negative", () => {
expect(
() =>
new KeyDefinition<boolean>(fakeStateDefinition, "fake", {
deserializer: (value) => value,
cleanupDelayMs: testValue,
cleanupDelayMs: -1,
}),
).toThrow();
});