Closed hantsy closed 1 year ago
I will take a look.
It looks like your project is using commonjs. https://jestjs.io/docs/ecmascript-modules
starting version 10 moq.ts is ESM. Prior versions are build as commonjs.
I am using Typescript, it should support ESM by default.
I am not using jest, so can't say for sure. But according official jest documentation jest ships with experimental support for ECMAScript Modules (ESM)..
Could you dig into settings and be sure that it should work? Or maybe can you create a demo project with another ESM project that you can use with jest. It will help me to sort it out.
OK, I am trying to update the example project to support ESM.
@hantsy With v10.0.6 I have added back commons support. Your example works fine with the it.
In my typescript sample project, I used moq.ts as a mocking example in tests, but in the latest updates, an exception was thrown when running the testing codes in Github actions.
The test example is here.