Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const parseCmdLine = (cmdLine: string): string[] => {
const parts = cmdLine.match(cmdSplitRegex) || [];
// clean up command
if (parts.length > 0 && parts[0]) {
parts[0] = removeSurroundingQuote(normalize(parts[0]));
parts[0] = normalize(removeSurroundingQuote(parts[0]));
}
return parts;
};
Expand Down
2 changes: 2 additions & 0 deletions tests/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ describe('platform-specific tests', () => {
${true} | ${'\\absolute\\jest --runInBand'} | ${{ cmd: '\\absolute\\jest', args: ['--runInBand'], program: '\\absolute\\jest' }}
${true} | ${'"\\dir with space\\jest" --arg1=1 --arg2 2 "some string"'} | ${{ cmd: '\\dir with space\\jest', args: ['--arg1=1', '--arg2', '2', '"some string"'], program: '\\dir with space\\jest' }}
${true} | ${'c:\\jest --arg1 "escaped \\"this\\" string" --arg2 2'} | ${{ cmd: 'c:\\jest', args: ['--arg1', '"escaped \\"this\\" string"', '--arg2', '2'], program: 'c:\\jest' }}
${true} | ${'"c:\\jest" --arg1 "escaped \\"this\\" string" --arg2 2'} | ${{ cmd: 'c:\\jest', args: ['--arg1', '"escaped \\"this\\" string"', '--arg2', '2'], program: 'c:\\jest' }}
${true} | ${`'c:\\jest' --arg1 "escaped \\"this\\" string" --arg2 2`} | ${{ cmd: 'c:\\jest', args: ['--arg1', '"escaped \\"this\\" string"', '--arg2', '2'], program: 'c:\\jest' }}
`('$cmdLine', ({ cmdLine, expected, isWin32 }) => {
if (!canRunTest(isWin32)) {
return;
Expand Down