Skip to content
Myr

Fix tests failing on Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sindre Sorhus · committed by Sindre Sorhus · parent 2633abb · Browse files · 2 files+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−3 removed

  • tests:+4 added−3 removed

2 files+4 added−3 removed

modified:test/convert/shared.js+2 added-1 removed
modified:test/return/early-error.js+2 added-2 removed
62 unmodified lines
63test('execaSync() output is undefined when the command does not exist, with buffer: false', () => testSpawnFailureOutput({buffer: false}));64test('execaSync() output is empty when the cwd does not exist', () => testSpawnFailureOutput({cwd: '/nonexistent-directory-for-execa'}));65test('execaSync() output runs the final of transforms when the command does not exist', () => testSpawnFailureOutput({stdout: convertTransformToFinal(getOutputGenerator(foobarString)(), true)}));6667// When `child_process.spawn()` throws, the output must be the same as when the subprocess spawns and fails right away67// When `child_process.spawn()` throws, the output must be the same as when the subprocess fails to spawn68const testEarlyErrorOutput = async options => {69 const {stdio, all} = await execa('nonexistent-command-for-execa', {...options, reject: false});69 const {stdio, all} = await execa('empty.js', {...options, cwd: 'does_not_exist', reject: false});70 const earlyError = await getEarlyErrorSubprocess({...options, reject: false});71 assert.deepEqual(earlyError.stdio, stdio);72 assert.deepEqual(earlyError.all, all);73 assert.deepEqual(earlyError.stdout, stdio[1]);
290 unmodified lines