You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests should pass with this mock. However, I am getting TS Errors for this:
error TS2345: Argument of type '() => { __esModule: boolean; default: { t: () => string; }; }' is not assignable to parameter of type 'MockModuleFactory<{ __esModule: boolean; default: { t: () => string; }; }>'.
Type '{ __esModule: boolean; default: { t: () => string; }; }' is not assignable to type '{ __esModule: boolean; default: { t: () => string; }; } & { __esModule: true; }'.
Type '{ __esModule: boolean; default: { t: () => string; }; }' is not assignable to type '{ __esModule: true; }'.
Types of property '__esModule' are incompatible.
Type 'boolean' is not assignable to type 'true'.
1 jest.mock('../../../modules/i18n', () => {
~~~~~~~
Link to repl or repo (highly encouraged)
I will provide one as soon as possible. But I'm positively sure, this issue is clear even without a demo.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
💥 Regression Report
Before 26.1.0 my tests using mock with ES6 declarations was working. On 26.1.0 and type script types 26.0.5 it is no longer working.
Last working version
Worked up to version: 26.0.0
Stopped working in version: 26.1.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tests should pass with this mock. However, I am getting TS Errors for this:
Link to repl or repo (highly encouraged)
I will provide one as soon as possible. But I'm positively sure, this issue is clear even without a demo.
Suspected change:
DefinitelyTyped/DefinitelyTyped#46072
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: