-
Notifications
You must be signed in to change notification settings - Fork 5
Description
For our own Angular TypeScript repo, I encountered the following error when I tried out testdouble-jest: It appears the test is being run by Jest, but the testdouble-jest module has not been initialized.... I did do the initialisation with require('testdouble-jest')(td, jest) and the mock function was added to the imported testdouble module, but it was not available in the module when required again here.
I tried to reproduce this by taking the example tests from this repo, porting them to TypeScript and updating to the latest version of Jest. See #6. Unfortunately, the error did not occur there, but at the same time all the test cases fail for other reasons. I haven't had time to investigate this any further, but am posting this here in case someone from the testdouble team would like to look at this.