From bccd4a81b8d36c80f2f7f9af3bac86853cb07fb2 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Fri, 11 Jun 2021 16:53:19 +0200 Subject: [PATCH] Add missing test file --- src/headless/tests/persistence.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/headless/tests/persistence.js diff --git a/src/headless/tests/persistence.js b/src/headless/tests/persistence.js new file mode 100644 index 000000000..675002c01 --- /dev/null +++ b/src/headless/tests/persistence.js @@ -0,0 +1,12 @@ +/* global mock */ + +describe("The persistent store", function() { + + it("is unique to the user based on their JID", + mock.initConverse(['discoInitialized'], {'persistent_store': 'IndexedDB'}, (done, _converse) => { + + expect(_converse.storage.persistent.config().storeName).toBe(_converse.bare_jid); + expect(_converse.storage.persistent.config().description).toBe('indexedDB instance'); + done(); + })); +});