fix(@embark/mocha): reset contracts before each test file

Caused issues because we kept in memory the old contracts, including
the onDeploys.
This commit is contained in:
Jonathan Rainville 2020-04-06 11:16:22 -04:00 committed by Iuri Matias
parent 1278365768
commit deb682c9d2
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ class MochaTestRunner {
});
},
(next) => {
// Reset contract config to make sure we don't deploy old contracts or worse, call old onDeploys
events.request("contracts:reset", next);
},
(next) => {
// Remove contracts that are not in the configs
const realContracts = {};
const deployKeys = Object.keys(cfg.contracts.deploy);