mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
18 lines
414 B
JavaScript
18 lines
414 B
JavaScript
/* global describe, it */
|
|
|
|
import { LegacyWallet } from './class'
|
|
let assert = require('assert')
|
|
|
|
describe('unit - LegacyWallet', function () {
|
|
it('serialize and unserialize work correctly', () => {
|
|
let a = new LegacyWallet()
|
|
a.setLabel('my1')
|
|
let key = JSON.stringify(a)
|
|
|
|
let b = LegacyWallet.fromJson(key)
|
|
assert(key === JSON.stringify(b))
|
|
|
|
assert.equal(key, JSON.stringify(b))
|
|
})
|
|
})
|