aboutsummaryrefslogtreecommitdiff
path: root/test/shared/versions/index.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/shared/versions/index.test.js')
-rw-r--r--test/shared/versions/index.test.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/test/shared/versions/index.test.js b/test/shared/versions/index.test.js
deleted file mode 100644
index d90f04c..0000000
--- a/test/shared/versions/index.test.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as versions from 'shared/versions';
-import manifest from '../../../manifest.json';
-
-describe("shared/versions/storage", () => {
- describe('#checkUpdated', () => {
- beforeEach(() => {
- return browser.storage.local.remove('version');
- });
-
- it('return true if no previous versions', async() => {
- let updated = await versions.checkUpdated();
- expect(updated).to.be.true;
- });
-
- it('return true if updated', async() => {
- await browser.storage.local.set({ version: '0.001' });
- let updated = await versions.checkUpdated();
- expect(updated).to.be.true;
- });
-
- it('return false if not updated', async() => {
- await browser.storage.local.set({ version: manifest.version });
- let updated = await versions.checkUpdated();
- expect(updated).to.be.false;
- });
- });
-
- describe('#commit', () => {
- beforeEach(() => {
- return browser.storage.local.remove('version');
- });
-
- it('saves current version from manifest.json', async() => {
- await versions.commit();
- let { version } = await browser.storage.local.get('version');
- expect(version).to.be.a('string');
- expect(version).to.equal(manifest.version);
- });
- });
-});