Skip to content

Commit

Permalink
one more try to fix path tests
Browse files Browse the repository at this point in the history
  • Loading branch information
connectdotz committed Feb 1, 2021
1 parent 69cbb86 commit 0b7690c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/setup-wizard/wizard-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ describe('mergeDebugConfigWithCmdLine', () => {
${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 }) => {
it('can parseCmdLine', () => {
if (!canRunTest(isWin32)) {
return;
}
const [actualCmd, ...actualArgs] = parseCmdLine(cmdLine);
expect(actualCmd).toEqual(expected.cmd);
expect(actualArgs).toEqual(expected.args);
Expand Down Expand Up @@ -671,7 +674,7 @@ describe('mergeDebugConfigWithCmdLine', () => {
${false} | ${'/absolute/root/path'} | ${'./jest'} | ${{ program: '/absolute/root/path/jest' }}
${false} | ${'/absolute/root/path'} | ${'../jest'} | ${{ program: '/absolute/root/jest' }}
${false} | ${'/absolute/root/path'} | ${'yarn test'} | ${{ runtimeExecutable: 'yarn' }}
${true} | ${undefined} | ${'jest'} | ${{ program: '${workspaceFolder}\\jest' }}
${true} | ${undefined} | ${'jest'} | ${{ program: '${workspaceFolder}\\jest', cwd: '${workspaceFolder}' }}
${true} | ${'c:\\absolute\\root\\path'} | ${'..\\jest'} | ${{ program: 'c:\\absolute\\root\\jest' }}
${true} | ${'\\absolute\\root\\path'} | ${'yarn test'} | ${{ runtimeExecutable: 'yarn' }}
`('with rootPath: $absoluteRootPath', ({ isWin32, absoluteRootPath, cmdLine, expected }) => {
Expand Down

0 comments on commit 0b7690c

Please sign in to comment.