Is your feature request related to a problem? Please describe.
It would be convenient to offer a way to specify a spot within the test command to indicate where the extension args should be placed. I have a weird case where my jest command is actually provided to another command, but appending the arguments to the end fails to put the in the right context.
Example Command:
npx firebase emulators:exec 'jest'
Describe the solution you'd like
Detect a $JEST_EXTENSION_ARGS variable in the configured jest.jestCommandLine.
If present, expand the arguments in its place.
Otherwise, append arguments to end, as they're done now.
In my example, I would set jest.jestCommandLine to:
npx firebase emulators:exec 'jest $JEST_EXTENSION_ARGS'
which would expand to:
npx firebase emulators:exec 'jest --testNamePattern StudentPortalService --testPathPattern /Users/user/.../src/example\.spec\.ts' and properly pass the args to the secondary command. To be clear, note that the arguments are now within the single quoted jest command, instead of trailing it.
Describe alternatives you've considered
I've tried to find a solution using npm script variables, but there doesn't seem to be one that equates to "all trailing arguments".
Is your feature request related to a problem? Please describe. It would be convenient to offer a way to specify a spot within the test command to indicate where the extension args should be placed. I have a weird case where my jest command is actually provided to another command, but appending the arguments to the end fails to put the in the right context. Example Command:
npx firebase emulators:exec 'jest'
Unfortunate Extension Command:
npx firebase emulators:exec 'jest' --testNamePattern StudentPortalService --testPathPattern /Users/user/.../src/example\.spec\.ts
Describe the solution you'd like Detect a
$JEST_EXTENSION_ARGS
variable in the configuredjest.jestCommandLine
. If present, expand the arguments in its place. Otherwise, append arguments to end, as they're done now.In my example, I would set
jest.jestCommandLine
to:npx firebase emulators:exec 'jest $JEST_EXTENSION_ARGS'
which would expand to:npx firebase emulators:exec 'jest --testNamePattern StudentPortalService --testPathPattern /Users/user/.../src/example\.spec\.ts'
and properly pass the args to the secondary command. To be clear, note that the arguments are now within the single quotedjest
command, instead of trailing it.Describe alternatives you've considered I've tried to find a solution using npm script variables, but there doesn't seem to be one that equates to "all trailing arguments".