Skip to content
Myr

Rename a variable to avoid confusion (#779)

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

authored by ehmicky · committed by GitHub · parent 7591905 · Browse files · 1 file+6 added−6 removed
This commit

State

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

Diff stats

1 file+6 added−6 removed

  • tests:+6 added−6 removed

1 file+6 added−6 removed

modified:test/test.js+6 added-6 removed
13 unmodified lines
14process.env.FOO = 'foo';1516const ENOENT_REGEXP = process.platform === 'win32' ? /failed with exit code 1/ : /spawn.* ENOENT/;1718const testOutput = async (t, index, execaCommand) => {19 const {stdout, stderr, stdio} = await execaCommand('noop-fd.js', [`${index}`, 'foobar'], fullStdio);18const testOutput = async (t, index, execaMethod) => {19 const {stdout, stderr, stdio} = await execaMethod('noop-fd.js', [`${index}`, 'foobar'], fullStdio);20 t.is(stdio[index], 'foobar');2122 if (index === 1) {23 t.is(stdio[index], stdout);
8 unmodified lines
32test('can return stdout - sync', testOutput, 1, execaSync);33test('can return stderr - sync', testOutput, 2, execaSync);34test('can return output stdio[*] - sync', testOutput, 3, execaSync);3536const testNoStdin = async (t, execaCommand) => {37 const {stdio} = await execaCommand('noop.js', ['foobar']);36const testNoStdin = async (t, execaMethod) => {37 const {stdio} = await execaMethod('noop.js', ['foobar']);38 t.is(stdio[0], undefined);39};4041test('cannot return stdin', testNoStdin, execa);
31 unmodified lines
73 const {exitCode} = execaSync('fail.js', {reject: false});74 t.is(exitCode, 2);75});7677const testStripFinalNewline = async (t, index, stripFinalNewline, execaCommand) => {78 const {stdio} = await execaCommand('noop-fd.js', [`${index}`, 'foobar\n'], {...fullStdio, stripFinalNewline});77const testStripFinalNewline = async (t, index, stripFinalNewline, execaMethod) => {78 const {stdio} = await execaMethod('noop-fd.js', [`${index}`, 'foobar\n'], {...fullStdio, stripFinalNewline});79 t.is(stdio[index], `foobar${stripFinalNewline === false ? '\n' : ''}`);80};8182test('stripFinalNewline: undefined with stdout', testStripFinalNewline, 1, undefined, execa);
241 unmodified lines