Browse Source

Add missing test file

JC Brand 4 years ago
parent
commit
bccd4a81b8
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/headless/tests/persistence.js

+ 12 - 0
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();
+    }));
+});