Open BrandonALittle opened 1 year ago
It looks like you may have some customised jest packages, is that correct?
We were able to reproduce your issue using the package.json
below:
{
"name": "wallaby-3277",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
},
"devDependencies": {
"@jest/core": "npm:@rwx-research/jest-core@^29.5.3",
"@swc/core": "^1.3.92",
"@swc/jest": "^0.2.29",
"jest": "29.7.0",
"jest-circus": "npm:@rwx-research/jest-circus@^29.5.3",
"jest-config": "npm:@rwx-research/jest-config@^29.5.3",
"jest-environment-jsdom": "29.7.0",
"jest-fail-on-console": "^3.1.1",
"jest-mock": "^29.7.0",
"jest-pact": "^0.11.0",
"jest-runner": "npm:@rwx-research/jest-runner@^29.5.3"
}, "pnpm": {
"overrides": {
"@jest/core": "npm:@rwx-research/jest-core@29.5.3",
"jest-config": "npm:@rwx-research/jest-config@29.5.3",
"jest-runner": "npm:@rwx-research/jest-runner@29.5.3",
"jest-circus": "npm:@rwx-research/jest-circus@29.5.3"
}
}
}
When we updated to use the official jest
packages, everything works for us (with pnpm
overrides):
{
"name": "wallaby-3277",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
},
"devDependencies": {
"@jest/core": "npm:@jest/core@^29.5.0",
"@swc/core": "^1.3.92",
"@swc/jest": "^0.2.29",
"jest": "29.7.0",
"jest-circus": "npm:jest-circus@^29.5.0",
"jest-config": "npm:jest-config@^29.5.0",
"jest-environment-jsdom": "29.7.0",
"jest-fail-on-console": "^3.1.1",
"jest-mock": "^29.7.0",
"jest-pact": "^0.11.0",
"jest-runner": "npm:jest-runner@^29.5.0"
}, "pnpm": {
"overrides": {
"@jest/core": "npm:@jest/core@29.5.0",
"jest-config": "npm:jest-config@29.5.0",
"jest-runner": "npm:jest-runner@29.5.0",
"jest-circus": "npm:jest-circus@29.5.0"
}
}
}
What we can see happening in the internals of Wallaby is that our call to jest to return your project configuration is returning an empty configuration object.
I'm not sure what changes have been made to your custom packages; it's possible that the changes are not compatible with Wallaby's support for jest's production build.
Wallaby has a number of integration points for the various testing frameworks that we support, including on-the-fly in-memory patching of some npm module file content as it is read from disk at runtime. It's also possible that when using your custom packages (looks like on disk it's @rwx-research+jest*
) our integration points are not being correctly applied.
If you can provide us with access to the @rwx-research/jest
modifications, we could quickly check if there are breaking changes made to your files for the integration. Otherwise, I expect the problem is incompatible paths between jest's packages and your custom packages. Unfortunately I don't think we can easily support a custom build of jest's modules.
Thanks for digging into this! I've done more digging on my side as well. I'm ten days new to this codebase, and have never heard of ABQ before: https://github.com/rwx-research/abq, which is where this configuration is coming from: https://www.rwx.com/docs/abq/test-frameworks/jest#using-pnpm. The problem is easily solved by removing the overrides
configuration object from package.json
, and re-installing my packages. However, that's not going to work for my larger org and can't be checked in to version control. ABQ is being used to speed up CI pipelines and save $.
I can manage this a couple of ways locally, but it would be outstanding if I could just configure wallaby to work with this config. I totally understand you can't support a custom build of jest's modules, however. Please share any thoughts you might have. Thanks!
Unfortunately we don't have a good solution for you in this space, besides adding first class support for abq with the various testing frameworks it supports.
Happy to repurpose this issue as a feature request to add support if you like?
Looking at npm trends, the @rwx-research/jest-core
usage numbers are quite low (about 0.03% of jest), and so not something we can justify adding support for at the moment, but we are happy to monitor and reconsider if/when that changes.
Issue description or question
I read that Wallaby supports PNPM out of the box, but I'm not having success getting it running. I suspect this may be due to PNPM overrides, but I'm not sure. I am attempting automatic configuration.
My jest.config.js in the root:
PNPM overrides (in package.json):
When I attempt to copy the diagnostics report (in VSCODE), there is no command to do so.The command was not easy to find, but must be something with VSCODE.Wallaby diagnostics report