aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-04-06 03:32:55 +0800
committerGitHub <noreply@github.com>2018-04-06 03:32:55 +0800
commit50c36074fb94d0a3de53d32a5aee35f573162397 (patch)
treeefec0fd2bab9e2519e3d5d4e3b887e57f8c0fa22 /test/unit
parente774fbcece4154e796d710228e90cf2c413fb810 (diff)
parent4efc718074a819c15beceece5e0f08b49c8b60bb (diff)
downloadtangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar.gz
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar.bz2
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar.lz
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar.xz
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.tar.zst
tangerine-wallet-browser-50c36074fb94d0a3de53d32a5aee35f573162397.zip
Merge pull request #3899 from MetaMask/migration-24-fix
make migration-24 compat with first-time-state
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/migrations/024-test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/migrations/024-test.js b/test/unit/migrations/024-test.js
index dab77d4e4..c3c03d06b 100644
--- a/test/unit/migrations/024-test.js
+++ b/test/unit/migrations/024-test.js
@@ -1,5 +1,9 @@
const assert = require('assert')
const migration24 = require('../../../app/scripts/migrations/024')
+const firstTimeState = {
+ meta: {},
+ data: require('../../../app/scripts/first-time-state'),
+}
const properTime = (new Date()).getTime()
const storage = {
"meta": {},
@@ -34,4 +38,12 @@ describe('storage is migrated successfully and the txParams.from are lowercase',
done()
}).catch(done)
})
+
+ it('should migrate first time state', (done) => {
+ migration24.migrate(firstTimeState)
+ .then((migratedData) => {
+ assert.equal(migratedData.meta.version, 24)
+ done()
+ }).catch(done)
+ })
})