The before, beforeEachand tests in a single test file should not be returning different results when querying a contract property instance that hasn't been changed in that test file.
1st test file runs
beforeEach - instantiates a new token CLNY = Token.new()=> and sets it on ColonyNetwork.deployed()
2nd test file runs
before - get ColonyNetwork.deployed() => get CLNY - returns a new address
beforeEach - get ColonyNetwork.deployed() => get CLNY- returns a new address
helper function - get ColonyNetwork.deployed() => get CLNY - returns the address from 1st test above
The before and beforeEach of 2) are inventing some unknown token instance
I haven't had time to isolate this into a minimum working example, but using our test suite at Colony you can just run colony-network-auction.js and colony-network-mining.js test files and observe this problem in that the MetaColony.token property differs in colony-network-mining.js between the before and tests.
[email protected][email protected]Thanks @elenadimitrova. Looking into this now!
@elenadimitrova, Were you able to get a minimal test case for this issue? We're having a hard time pinpointing the issue ourselves.
I am having the same issue as well @davidmurdoch, I can run individual test perfectly but not in full test suite.
@elenadimitrova, thanks for reporting this and @0xAshish for the additional info!
Can you try the latest ganache-cli@beta (v6.2.4-beta.1) and let us know if you're still experiencing this issue during your unit tests?
@nicholasjpaterno Thanks that worked awesomely. 馃槑
@0xAshish Awesome, very glad to hear that!
I'm going to close this for now, @elenadimitrova if you're still experiencing this issue - please feel free to reopen!
This is fine for us too. Thanks for addressing @nicholasjpaterno !
Most helpful comment
This is fine for us too. Thanks for addressing @nicholasjpaterno !