Skip to content

Commit

Permalink
add test for validateContractAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
koteld committed Apr 19, 2020
1 parent df033bf commit 512fe10
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const main = require('../src/main');
const main = require('../src/core/common');
const { NetworkName } = require('../src/core/enums');
const assert = require('assert');

describe('main.js', function() {
describe('#validateContractAddress(options)', function() {
it('should return { validated: true, err: \'\' } with address=0x091bb13E6e55F07E9A42CBAa59e2c225C4a96E47 and ropsten=true', async function() {
let result = await main.validateContractAddress({
describe('Gaster common', function() {
describe('#validateContractAddress', function() {
it('should return { validated: true, err: \'\' } with address=0xF324A8f3e0DbeD9059e5acBfC6C53a31A82b6AfB in Ropsten network', async function() {
const address = '0xF324A8f3e0DbeD9059e5acBfC6C53a31A82b6AfB';
const options = {
net: NetworkName.ROPSTEN,
address: '0x091bb13E6e55F07E9A42CBAa59e2c225C4a96E47'
})
}
const result = await main.validateContractAddress(
address,
options,
);

assert.equal(result.validated, true);
assert.equal(result.err, '');
});
});
});
});

0 comments on commit 512fe10

Please sign in to comment.