Mock routes are throwing errors.
pratheekhegde opened this issue ยท 3 comments
pratheekhegde commented
What you did:
- Turned on Chaos Monkey from the settings.
- Clicked on any of the example mock routes.
What happened:
Problem description:
hitByMonkey
util method is defined as a commonjs export but imported as an ES6 import inmockit-routes/src/middlewares/chaos-monkey/index.js
Suggested solution:
- Change
const { hitByMonkey } = require("./util");
toconst hitByMonkey = require("./util");
- Or any other way.
boyney123 commented
Thanks for raising this @pratheekhegde, I have put in a fix in this PR #11
boyney123 commented
Merged in, thanks again for raising the issue @pratheekhegde ๐
pratheekhegde commented
You are welcome. ๐