Skip to content

Commit 002c428

Browse files
committed
tests: remove h2b
1 parent ea9c825 commit 002c428

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/base58check.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ var base58check = require('../src/base58check')
33

44
var fixtures = require('./fixtures/base58check.json')
55

6-
function h2b(h) { return new Buffer(h, 'hex') }
7-
86
describe('base58check', function() {
97
describe('decode', function() {
108
fixtures.valid.forEach(function(f) {
119
it('can decode ' + f.string, function() {
12-
var actual = base58check.decode(f.string)
13-
var expected = h2b(f.payload)
10+
var actual = base58check.decode(f.string).toString('hex')
1411

15-
assert.deepEqual(actual, expected)
12+
assert.equal(actual, f.payload)
1613
})
1714
})
1815

@@ -28,10 +25,9 @@ describe('base58check', function() {
2825
describe('encode', function() {
2926
fixtures.valid.forEach(function(f) {
3027
it('can encode ' + f.string, function() {
31-
var actual = base58check.encode(h2b(f.payload))
32-
var expected = f.string
28+
var actual = base58check.encode(new Buffer(f.payload, 'hex'))
3329

34-
assert.strictEqual(actual, expected)
30+
assert.strictEqual(actual, f.string)
3531
})
3632
})
3733
})

0 commit comments

Comments
 (0)