Skip to content

Commit

Permalink
feat: accept any jest arg
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Dec 10, 2024
1 parent 4d32f07 commit 61912c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cli/src/commands/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ const getAppJestConfig = ({ jestConfigPath, paths }) => {
}
}

const cleanRest = (rest) => {
const clonedRest = { ...rest }
// These properties are not valid Jest CLI arguments
delete clonedRest._
delete clonedRest.docsite
delete clonedRest['$0']
delete clonedRest.getCache
return clonedRest
}

const handler = async ({
verbose,
cwd,
Expand All @@ -25,6 +35,7 @@ const handler = async ({
watch,
watchAll,
jestConfig: jestConfigPath,
...rest
}) => {
const paths = makePaths(cwd)

Expand Down Expand Up @@ -65,6 +76,7 @@ const handler = async ({
watchAll: (!ci && watchAll) || undefined,
ci,
verbose: verbose,
...cleanRest(rest),
},
[paths.base]
)
Expand Down

0 comments on commit 61912c9

Please sign in to comment.