Enforce stronger types for ArrayBuffers and storage
This commit is contained in:
parent
61ac79e9ae
commit
8f5086227a
56 changed files with 748 additions and 675 deletions
|
@ -44,14 +44,15 @@ describe('#cleanupSessionResets', () => {
|
|||
it('filters out falsey items', () => {
|
||||
const startValue = {
|
||||
one: 0,
|
||||
two: false,
|
||||
three: Date.now(),
|
||||
two: Date.now(),
|
||||
};
|
||||
window.storage.put('sessionResets', startValue);
|
||||
cleanupSessionResets();
|
||||
const actual = window.storage.get('sessionResets');
|
||||
|
||||
const expected = window._.pick(startValue, ['three']);
|
||||
const expected = window._.pick(startValue, ['two']);
|
||||
assert.deepEqual(actual, expected);
|
||||
|
||||
assert.deepEqual(Object.keys(startValue), ['two']);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue