diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-04-06 02:28:25 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-04-06 02:28:25 +0800 |
commit | 4efc718074a819c15beceece5e0f08b49c8b60bb (patch) | |
tree | ea7d107daa61a22b93599c1a923abdd1436f1434 /test | |
parent | 1153120fe84e9d4cde47a7e416028be0fec3c61c (diff) | |
download | tangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.tar.gz tangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.tar.zst tangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.zip |
make migration-24 compat with first-time-state
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/migrations/024-test.js | 12 |
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) + }) }) |