From b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Thu, 5 Apr 2018 16:22:24 -0700 Subject: meta - create a migration template --- test/unit/migrations/template-test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/unit/migrations/template-test.js (limited to 'test') diff --git a/test/unit/migrations/template-test.js b/test/unit/migrations/template-test.js new file mode 100644 index 000000000..35060e2fe --- /dev/null +++ b/test/unit/migrations/template-test.js @@ -0,0 +1,17 @@ +const assert = require('assert') +const migrationTemplate = require('../../../app/scripts/migrations/template') +const properTime = (new Date()).getTime() +const storage = { + meta: {}, + data: {}, +} + +describe('storage is migrated successfully', () => { + it('should work', (done) => { + migrationTemplate.migrate(storage) + .then((migratedData) => { + assert.equal(migratedData.meta.version, 0) + done() + }).catch(done) + }) +}) -- cgit