aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/migrations/template-test.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-04-06 14:17:22 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-04-06 14:17:22 +0800
commit4c15c0d3baa15638d75aa5e1a8f336e515d35f95 (patch)
tree2cdb6ea7faaf39bb577986d62fc2b17bef586def /test/unit/migrations/template-test.js
parent2db55cd0de31abacf2d00eba76505fa6b880928d (diff)
parent77486a23654a7709091f99bc7ef76d894a46113a (diff)
downloadtangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar.gz
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar.bz2
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar.lz
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar.xz
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.tar.zst
tangerine-wallet-browser-4c15c0d3baa15638d75aa5e1a8f336e515d35f95.zip
Merge branch 'master' of https://github.com/MetaMask/metamask-extension into cb-254
Diffstat (limited to 'test/unit/migrations/template-test.js')
-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)
+ })
+})