4 changed files with 1 additions and 50 deletions
@ -1,18 +0,0 @@ |
|||
var bs58check = require('bs58check') |
|||
|
|||
function decode () { |
|||
console.warn('bs58check will be removed in 2.0.0. require("bs58check") instead.') |
|||
|
|||
return bs58check.decode.apply(undefined, arguments) |
|||
} |
|||
|
|||
function encode () { |
|||
console.warn('bs58check will be removed in 2.0.0. require("bs58check") instead.') |
|||
|
|||
return bs58check.encode.apply(undefined, arguments) |
|||
} |
|||
|
|||
module.exports = { |
|||
decode: decode, |
|||
encode: encode |
|||
} |
@ -1,30 +0,0 @@ |
|||
/* global describe, it, beforeEach */ |
|||
|
|||
var assert = require('assert') |
|||
var base58check = require('../src/base58check') |
|||
var bs58check = require('bs58check') |
|||
var sinon = require('sinon') |
|||
|
|||
describe('base58check', function () { |
|||
var param |
|||
|
|||
beforeEach(function () { |
|||
param = {} |
|||
}) |
|||
|
|||
it('wraps bs58check.decode', sinon.test(function () { |
|||
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 () { |
|||
var expectation = this.mock(bs58check).expects('encode') |
|||
expectation.once().calledWith(param) |
|||
expectation.onCall(0).returns('foo') |
|||
|
|||
assert.equal(base58check.encode(param), 'foo') |
|||
})) |
|||
}) |
Loading…
Reference in new issue