Skip to content

Does testdouble-jest work with TypeScript? #7

@rene-leanix

Description

@rene-leanix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions