You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
765 B

'use strict';
var _ = require('lodash');
var chai = require('chai');
var sinon = require('sinon');
var should = chai.should();
var Copayer = require('../lib/model/copayer');
describe('Copayer', function() {
describe('#getCurrentAddressPath', function() {
it('return a valid BIP32 path for defaut copayer Index', function() {
var c = new Copayer();
c.getCurrentAddressPath(false).should.equal('m/0/0/0');
c.getCurrentAddressPath(true).should.equal('m/0/1/0');
});
it('return a valid BIP32 path for given index', function() {
var c = new Copayer({
copayerIndex: 4
});
c.getCurrentAddressPath(false).should.equal('m/4/0/0');
c.getCurrentAddressPath(true).should.equal('m/4/1/0');
});
});
});