eduter / screeps-jest

Helper functions and environment for unit testing your Screeps code with Jest.
14 stars 4 forks source link

Jest v27 incompatible? #20

Closed patrickhousley closed 3 years ago

patrickhousley commented 3 years ago

When running with jest@27.1.0 and ts-jest@27.0.5, the below error is thrown.

    TypeError: Cannot read property 'fn' of undefined

      at Object.mockRoomPositionConstructor (node_modules/screeps-jest/src/mocking.js:133:53)
      at TestEnvironment.setup (node_modules/screeps-jest/src/TestEnvironment.js:13:19)
      at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
      at runJest (node_modules/@jest/core/build/runJest.js:387:19)
      at _run10000 (node_modules/@jest/core/build/cli/index.js:408:7)
      at runCLI (node_modules/@jest/core/build/cli/index.js:261:3)
eduter commented 3 years ago

Yeah, someone already pointed that out in Discord a while ago. Apparently, there was a breaking change in Jest v27, but I haven't looked into it yet. Thanks for creating a ticket for it 👍

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: