Fixed up testcases for namehash.
This commit is contained in:
parent
301d803fc5
commit
9e80c55275
@ -90,9 +90,20 @@ function testUnits(test) {
|
||||
test.done();
|
||||
}
|
||||
|
||||
function testNamehash(test) {
|
||||
var namehash = require('../utils/namehash');
|
||||
|
||||
var testcases = require('./tests/ens.json');
|
||||
testcases.forEach(function(testcase) {
|
||||
test.equal(namehash(testcase.name), testcase.expected, 'namehash(' + testcase.name + ')');
|
||||
});
|
||||
test.done();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
"address": testAddress,
|
||||
"contract-address": testContractAddress,
|
||||
'namehash': testNamehash,
|
||||
"rlp-coder": testRLPCoder,
|
||||
"units": testUnits,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user