aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-06 07:22:24 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-06 07:25:13 +0800
commitb9243cd8b9aab3f7eae07fb29f0f184e9a263ee3 (patch)
treeb512cd650c05e5f3f7886c7e6d53bc8e11e6abba /test
parent79932b7e17dd12803e3674ed0780f0edad134a8a (diff)
downloadtangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar.gz
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar.bz2
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar.lz
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar.xz
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.tar.zst
tangerine-wallet-browser-b9243cd8b9aab3f7eae07fb29f0f184e9a263ee3.zip
meta - create a migration template
Diffstat (limited to 'test')
-rw-r--r--test/unit/migrations/template-test.js17
1 files changed, 17 insertions, 0 deletions
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)
+ })
+})