mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
18 lines
423 B
JavaScript
18 lines
423 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));
|
|
});
|
|
});
|