Closed flchaux closed 2 months ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This was fixed in #14749
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.
I initialize a project with jest 29, I set a setupFiles within an default export function, this function is never called. The setup file is executed, but not the function.
Version
29.7.0
Steps to reproduce
There is one setup file, with an exported function. There is a log in the exported function body and in the file body to ensure the file is executed.
Expected behavior
The test should pass because global.foo is defined to "bar" into setupFiles file. The log called in the exported function should be called.
Actual behavior
The test doesn't pass and only the log in the setupFiles file is displayed. The global variable is not set and the log in the exported function is not displayed.
Additional context
No response
Environment