Added name resolve test cases (need more though).
This commit is contained in:
parent
d5402d017a
commit
7b1856aacb
@ -466,12 +466,24 @@ function testENSWrite(test) {
|
|||||||
testENSProviderWrite(test, new providers.InfuraProvider(true));
|
testENSProviderWrite(test, new providers.InfuraProvider(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testENS(test) {
|
||||||
|
var provider = providers.getDefaultProvider(true);
|
||||||
|
provider.resolveName('ricmoose.eth').then(function(address) {
|
||||||
|
test.equal('0x5543707cC4520F3984656e8eDEa6527ca474E77B', address, 'Simple ENS name');
|
||||||
|
return provider.resolveName('duck.ricmoose.eth');
|
||||||
|
}).then(function(address) {
|
||||||
|
test.equal('0xf770358c6F29FAA38186E49c149C87968775B228', address, 'Nested ENS name');
|
||||||
|
test.done();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'read-only': testReadOnly,
|
'read-only': testReadOnly,
|
||||||
'write': testWrite,
|
'write': testWrite,
|
||||||
'events': testEvents,
|
'events': testEvents,
|
||||||
'contracts': testContracts,
|
'contracts': testContracts,
|
||||||
'deploy': testDeploy,
|
'deploy': testDeploy,
|
||||||
|
'ens': testENS,
|
||||||
'ens-readonly': testENSReadOnly,
|
'ens-readonly': testENSReadOnly,
|
||||||
'ens-write': testENSWrite,
|
'ens-write': testENSWrite,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user