Closed carvajalluis closed 2 years ago
Hi @carvajalluis! Happy to hear you're an advocate π
From your error output, this is breaking:
Which means either configPath
here is incorrect:
or the imported config module has a different structure than expected.
Are you running jest-it-up
from the root of your project, where jest.config.js
is located? There is currently no config file resolving algorithm, so if the command runs from a nested directory, it will likely fail.
@rbardini thank you for your prompt response!
The file is at the root of the project here is the file listing:
$ ls -h
__tests__/ contexts/ jsconfig.json node_modules/
styles.css components/ coverage/ jest.config.js package.json
public/ jest.setup.js next.config.js pages/ readme.md src/ yarn.lock
and when debugging jest-it-up it is found
but that immediately takes me away with the next jest setup to another place :
there is where I get lost because I thought all jest-it-up did was grab the config file and edit it, but now I see you load the config and update the file completely after new coverage is generated?
i think it is because new jest.config.js returns a callback to a function instead of a plain js object, global has many embeded globals with nothing like the content of the file .
Indeed, the problem is that createJestConfig
returns an async function instead of an object. I'll release a new version with a fix soon.
:tada: This issue has been resolved in version 2.0.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@rbardini thank you very much for your prompt jump at this one ,
Happy coding!!
Hello There! have been a promoter of this project for a while in my work because it helps me keep the demons at bay with the unit testing, thank you very much for it. Recently I found myself trying Next JS 12 and for some reason, I couldn't use jest-it-up with the
createJestConfig
export. The steps to reproduce:jest.config.js
like this:but what i get on post test execution is
from what I read in your code you are expecting the coverage to be at a root level in the file directly, currently runing a package.json