Skip to content

Commit

Permalink
Fix failing test due to branch rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 18, 2024
1 parent 4cb38a0 commit d95242e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ if (isWindows) {

test('Uses PATHEXT with options.shell', async t => {
t.is(path.extname(process.execPath), '.exe');
const {exitCode, stderr} = await nanoSpawn(process.execPath.slice(0, -4), ['-e', 'console.log(".")'], {
const {exitCode, stderr} = await t.throwsAsync(nanoSpawn(process.execPath.slice(0, -4), ['-e', 'console.log(".")'], {
env: {...process.env, PATHEXT: '.COM'},
shell: true,
});
}));
t.is(exitCode, 1);
t.true(stderr.includes('not recognized as an internal or external command'));
});
Expand All @@ -329,7 +329,7 @@ test('Handles non-existing command without options.shell', async t => {
});

test('Handles non-existing command with options.shell', async t => {
const {exitCode, stderr} = await nanoSpawn('non-existent-command', {shell: true});
const {exitCode, stderr} = await t.throwsAsync(nanoSpawn('non-existent-command', {shell: true}));
if (isWindows) {
t.is(exitCode, 1);
t.true(stderr.includes('not recognized as an internal or external command'));
Expand Down

0 comments on commit d95242e

Please sign in to comment.