Fixed up testcases for namehash.
This commit is contained in:
parent
301d803fc5
commit
9e80c55275
@ -90,9 +90,20 @@ function testUnits(test) {
|
|||||||
test.done();
|
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 = {
|
module.exports = {
|
||||||
"address": testAddress,
|
"address": testAddress,
|
||||||
"contract-address": testContractAddress,
|
"contract-address": testContractAddress,
|
||||||
|
'namehash': testNamehash,
|
||||||
"rlp-coder": testRLPCoder,
|
"rlp-coder": testRLPCoder,
|
||||||
"units": testUnits,
|
"units": testUnits,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user