summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorhackademix2019-10-23 00:08:05 +0200
committerhackademix2019-10-25 23:19:48 +0100
commit7f4c3450fdc6895bf36eeba9c3184a0814275a21 (patch)
tree7f0eb1b4837eee73879e7be106cd1a6b3ee4dab6 /src/test
parentd196982cd5c7315d3825456223fee158bf01766c (diff)
downloadnoscript-7f4c3450fdc6895bf36eeba9c3184a0814275a21.tar.gz
noscript-7f4c3450fdc6895bf36eeba9c3184a0814275a21.tar.xz
noscript-7f4c3450fdc6895bf36eeba9c3184a0814275a21.zip
Fixed bug in chunked storage causing shrunk items not to be retrieved correctly.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/Storage_test.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/Storage_test.js b/src/test/Storage_test.js
index c0a5af8..6c16c75 100644
--- a/src/test/Storage_test.js
+++ b/src/test/Storage_test.js
@@ -56,6 +56,13 @@
async () => await eq("small2", "k", 3),
async () => await eq("bigObject", "k0000", "v0000"),
async () => await eq("hugeObject", "k0001", "v0001"),
+ async () => {
+ let key = "bigObject";
+ let wasChunked = await Storage.isChunked(key);
+ await Storage.set("sync", {[key]: {tiny: "prop"}});
+ return wasChunked && !(await Storage.isChunked(key));
+ },
+ async () => eq("bigObject", "tiny", "prop"),
async () => {
await Storage.remove("sync", keys);
let myItems = await Storage.get("sync", keys);