Skip to content

Commit

Permalink
Ensure --load-env-files is not passed to jest
Browse files Browse the repository at this point in the history
Not sure why this passed as 'loadEnvFiles' into the testHandler,
however this fixes the issue at hand – resolves redwoodjs#11884
  • Loading branch information
Philzen committed Jan 7, 2025
1 parent 5e1ba7e commit 76c4774
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cli/src/commands/testHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ export const handler = async ({
const rwjsPaths = getPaths()
const forwardJestFlags = Object.keys(others).flatMap((flagName) => {
if (
['watch', 'collect-coverage', 'db-push', '$0', '_'].includes(flagName)
[
'watch',
'collect-coverage',
'db-push',
'loadEnvFiles',
'$0',
'_',
].includes(flagName)
) {
// filter out flags meant for the rw test command only
return []
Expand Down

0 comments on commit 76c4774

Please sign in to comment.