Skip to content

Commit deb682c

Browse files
jrainvilleiurimatias
authored andcommitted
fix(@embark/mocha): reset contracts before each test file
Caused issues because we kept in memory the old contracts, including the onDeploys.
1 parent 1278365 commit deb682c

File tree

1 file changed

+4
-0
lines changed
  • packages/plugins/mocha-tests/src/lib

1 file changed

+4
-0
lines changed

packages/plugins/mocha-tests/src/lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ class MochaTestRunner {
114114
});
115115
},
116116
(next) => {
117+
// Reset contract config to make sure we don't deploy old contracts or worse, call old onDeploys
118+
events.request("contracts:reset", next);
119+
},
120+
(next) => {
117121
// Remove contracts that are not in the configs
118122
const realContracts = {};
119123
const deployKeys = Object.keys(cfg.contracts.deploy);

0 commit comments

Comments
 (0)