-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for validateContractAddress
- Loading branch information
Showing
1 changed file
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, ''); | ||
}); | ||
}); | ||
}); | ||
}); |