Skip to content

Commit

Permalink
fix(@embark/mocha): reset contracts before each test file
Browse files Browse the repository at this point in the history
Caused issues because we kept in memory the old contracts, including
the onDeploys.
  • Loading branch information
jrainville authored and iurimatias committed Apr 7, 2020
1 parent 1278365 commit deb682c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/plugins/mocha-tests/src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit deb682c

Please sign in to comment.