Skip to content

Commit

Permalink
Update LocalStorage to clear storage if either SDK key or filter crit…
Browse files Browse the repository at this point in the history
…eria changes
  • Loading branch information
EmilianoSanchez committed Dec 6, 2023
1 parent 400d93c commit c3e93a3
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 66 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"node": ">=6"
},
"dependencies": {
"@splitsoftware/splitio-commons": "1.12.0",
"@splitsoftware/splitio-commons": "1.12.1-rc.5",
"@types/google.analytics": "0.0.40",
"@types/ioredis": "^4.28.0",
"bloom-filters": "^3.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/browserSuites/push-corner-cases.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ window.EventSource = EventSourceMock;

import { SplitFactory } from '../../';
import { settingsFactory } from '../../settings';
import { getStorageHash } from '@splitsoftware/splitio-commons/src/storages/KeyBuilder';

const userKey = 'nicolas@split.io';

Expand Down Expand Up @@ -47,6 +48,7 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {

// prepare localstorage to allow SPLIT_KILL kill locally
localStorage.clear();
localStorage.setItem('pushCornerCase.SPLITIO.hash', getStorageHash(settings));
localStorage.setItem('pushCornerCase.SPLITIO.splits.till', 25);
localStorage.setItem('pushCornerCase.SPLITIO.split.whitelist', JSON.stringify({
'name': 'whitelist',
Expand Down
Loading

0 comments on commit c3e93a3

Please sign in to comment.