Truffle Javascript test in Mocha framework
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
This is a Truffle test written in Javascript using Mocha test framework. It tests my Solidity smart contract ArbitrableBlacklist.
To be able to test an internal function, I inherited ArbitrableBlacklist from ExposedArbitrableBlacklist and used that contract instead.
I would like to hear your comments about what could be improved in this test file to make it more readible and concise or simply a better test.
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const
expectThrow,
increaseTime
= require('../helpers/utils')
const ArbitrableBlacklist = artifacts.require('./ArbitrableBlacklist.sol')
const ExposedArbitrableBlacklist = artifacts.require('./ExposedArbitrableBlacklist.sol')
const CentralizedArbitrator = artifacts.require('./CentralizedArbitrator.sol')
const Item = artifacts.require('./ArbitrableBlacklist.sol')
const NOT_PAYABLE_VALUE = (2 ** 64 - 2) / 2
contract('ArbitrableBlacklist', function(accounts) )
javascript unit-testing mocha
add a comment |Â
up vote
0
down vote
favorite
This is a Truffle test written in Javascript using Mocha test framework. It tests my Solidity smart contract ArbitrableBlacklist.
To be able to test an internal function, I inherited ArbitrableBlacklist from ExposedArbitrableBlacklist and used that contract instead.
I would like to hear your comments about what could be improved in this test file to make it more readible and concise or simply a better test.
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const
expectThrow,
increaseTime
= require('../helpers/utils')
const ArbitrableBlacklist = artifacts.require('./ArbitrableBlacklist.sol')
const ExposedArbitrableBlacklist = artifacts.require('./ExposedArbitrableBlacklist.sol')
const CentralizedArbitrator = artifacts.require('./CentralizedArbitrator.sol')
const Item = artifacts.require('./ArbitrableBlacklist.sol')
const NOT_PAYABLE_VALUE = (2 ** 64 - 2) / 2
contract('ArbitrableBlacklist', function(accounts) )
javascript unit-testing mocha
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is a Truffle test written in Javascript using Mocha test framework. It tests my Solidity smart contract ArbitrableBlacklist.
To be able to test an internal function, I inherited ArbitrableBlacklist from ExposedArbitrableBlacklist and used that contract instead.
I would like to hear your comments about what could be improved in this test file to make it more readible and concise or simply a better test.
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const
expectThrow,
increaseTime
= require('../helpers/utils')
const ArbitrableBlacklist = artifacts.require('./ArbitrableBlacklist.sol')
const ExposedArbitrableBlacklist = artifacts.require('./ExposedArbitrableBlacklist.sol')
const CentralizedArbitrator = artifacts.require('./CentralizedArbitrator.sol')
const Item = artifacts.require('./ArbitrableBlacklist.sol')
const NOT_PAYABLE_VALUE = (2 ** 64 - 2) / 2
contract('ArbitrableBlacklist', function(accounts) )
javascript unit-testing mocha
This is a Truffle test written in Javascript using Mocha test framework. It tests my Solidity smart contract ArbitrableBlacklist.
To be able to test an internal function, I inherited ArbitrableBlacklist from ExposedArbitrableBlacklist and used that contract instead.
I would like to hear your comments about what could be improved in this test file to make it more readible and concise or simply a better test.
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const
expectThrow,
increaseTime
= require('../helpers/utils')
const ArbitrableBlacklist = artifacts.require('./ArbitrableBlacklist.sol')
const ExposedArbitrableBlacklist = artifacts.require('./ExposedArbitrableBlacklist.sol')
const CentralizedArbitrator = artifacts.require('./CentralizedArbitrator.sol')
const Item = artifacts.require('./ArbitrableBlacklist.sol')
const NOT_PAYABLE_VALUE = (2 ** 64 - 2) / 2
contract('ArbitrableBlacklist', function(accounts) )
javascript unit-testing mocha
edited Jun 23 at 9:43
t3chb0t
31.9k54095
31.9k54095
asked Jun 23 at 7:38
ferit
1012
1012
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f197108%2ftruffle-javascript-test-in-mocha-framework%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password