Parent bounty: #743
Mirrors #6524 because the original report is not owned by this account and its PR is closed without this fix being present on current main.
Bug
apps/api/package.json runs node --test src/tests. On current Node versions this treats src/tests as a module entrypoint instead of discovering the .test.js files beneath it, so npm test -w apps/api fails with MODULE_NOT_FOUND before executing the API tests.
Expected behavior
- The API workspace
test script targets concrete .test.js files.
npm test -w apps/api runs the API test suite successfully.
- The fix stays limited to the API package test script and does not change application behavior.
This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.
Parent bounty: #743
Mirrors #6524 because the original report is not owned by this account and its PR is closed without this fix being present on current
main.Bug
apps/api/package.jsonrunsnode --test src/tests. On current Node versions this treatssrc/testsas a module entrypoint instead of discovering the.test.jsfiles beneath it, sonpm test -w apps/apifails withMODULE_NOT_FOUNDbefore executing the API tests.Expected behavior
testscript targets concrete.test.jsfiles.npm test -w apps/apiruns the API test suite successfully.This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.