Testing Wallaby.js with TypeScript and jest.mock
The jest.mock
calls need to be hoisted above the require calls to make them work. This is done by babel-preset-jest
via ts-jest
. With wallaby this transform is apparently not applied.
Run yarn
or npm install
.
Run yarn test
or npm test
.
The one test should be succesful.
Start wallaby in the IDE of your choice.
The test will probably fail. Fixed with #1.