From 7f4c3450fdc6895bf36eeba9c3184a0814275a21 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 23 Oct 2019 00:08:05 +0200 Subject: Fixed bug in chunked storage causing shrunk items not to be retrieved correctly. --- src/test/Storage_test.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/test/Storage_test.js') 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); -- cgit v1.2.3