boyney123/mockit

Mock routes are throwing errors.

pratheekhegde opened this issue ยท 3 comments

What you did:

  • Turned on Chaos Monkey from the settings.
  • Clicked on any of the example mock routes.

What happened:

  • Opening the mock route threw an error.
    image

Problem description:

  • hitByMonkey util method is defined as a commonjs export but imported as an ES6 import in mockit-routes/src/middlewares/chaos-monkey/index.js

Suggested solution:

  • Change const { hitByMonkey } = require("./util"); to const hitByMonkey = require("./util");
  • Or any other way.

Thanks for raising this @pratheekhegde, I have put in a fix in this PR #11

Merged in, thanks again for raising the issue @pratheekhegde ๐Ÿ‘

You are welcome. ๐Ÿ˜ƒ