Browse Source

tests: amend base58check mock

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
efcad25751
  1. 10
      test/base58check.js

10
test/base58check.js

@ -11,15 +11,17 @@ describe('base58check', function() {
})
it('wraps bs58check.decode', sinon.test(function() {
this.mock(bs58check).expects('decode')
.once().calledWith(param).returns('foo')
var expectation = this.mock(bs58check).expects('decode')
expectation.once().calledWith(param)
expectation.onCall(0).returns('foo')
assert.equal(base58check.decode(param), 'foo')
}))
it('wraps bs58check.encode', sinon.test(function() {
this.mock(bs58check).expects('encode')
.once().calledWith(param).returns('foo')
var expectation = this.mock(bs58check).expects('encode')
expectation.once().calledWith(param)
expectation.onCall(0).returns('foo')
assert.equal(base58check.encode(param), 'foo')
}))

Loading…
Cancel
Save