specific.js
This file
Path
test/arguments/specific.js
38 lines · 3.0 KiB · JavaScript
Last changed by
TweaksSindre Sorhusbefore adoption698a1b8
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f65b86 point at it.
TweaksSindre Sorhusbefore adoption698a1b8
lines 1–2why, one step back1import assert from 'node:assert/strict';2import test from 'node:test';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 3–8why, one step back3import {execa, execaSync} from '../../index.js';4import {setFixtureDirectory} from '../helpers/fixtures-directory.js';5import {foobarString} from '../helpers/input.js';67setFixtureDirectory();8TweaksSindre Sorhusbefore adoption698a1b8
line 9why, one step back9const testPriorityOrder = async (buffer, bufferStdout, bufferStderr, execaMethod) => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 10why, one step back10 const {stdout, stderr} = await execaMethod('noop-both.js', {buffer});TweaksSindre Sorhusbefore adoption698a1b8
lines 11–12why, one step back11 assert.equal(stdout, bufferStdout ? foobarString : undefined);12 assert.equal(stderr, bufferStderr ? foobarString : undefined);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 13–14why, one step back13};14TweaksSindre Sorhusbefore adoption698a1b8
lines 15–38why, one step back15test('buffer: {stdout, fd1}', () => testPriorityOrder({stdout: true, fd1: false}, true, true, execa));16test('buffer: {stdout, all}', () => testPriorityOrder({stdout: true, all: false}, true, false, execa));17test('buffer: {fd1, all}', () => testPriorityOrder({fd1: true, all: false}, true, false, execa));18test('buffer: {stderr, fd2}', () => testPriorityOrder({stderr: true, fd2: false}, true, true, execa));19test('buffer: {stderr, all}', () => testPriorityOrder({stderr: true, all: false}, false, true, execa));20test('buffer: {fd2, all}', () => testPriorityOrder({fd2: true, all: false}, false, true, execa));21test('buffer: {fd1, stdout}', () => testPriorityOrder({fd1: false, stdout: true}, true, true, execa));22test('buffer: {all, stdout}', () => testPriorityOrder({all: false, stdout: true}, true, false, execa));23test('buffer: {all, fd1}', () => testPriorityOrder({all: false, fd1: true}, true, false, execa));24test('buffer: {fd2, stderr}', () => testPriorityOrder({fd2: false, stderr: true}, true, true, execa));25test('buffer: {all, stderr}', () => testPriorityOrder({all: false, stderr: true}, false, true, execa));26test('buffer: {all, fd2}', () => testPriorityOrder({all: false, fd2: true}, false, true, execa));27test('buffer: {stdout, fd1}, sync', () => testPriorityOrder({stdout: true, fd1: false}, true, true, execaSync));28test('buffer: {stdout, all}, sync', () => testPriorityOrder({stdout: true, all: false}, true, false, execaSync));29test('buffer: {fd1, all}, sync', () => testPriorityOrder({fd1: true, all: false}, true, false, execaSync));30test('buffer: {stderr, fd2}, sync', () => testPriorityOrder({stderr: true, fd2: false}, true, true, execaSync));31test('buffer: {stderr, all}, sync', () => testPriorityOrder({stderr: true, all: false}, false, true, execaSync));32test('buffer: {fd2, all}, sync', () => testPriorityOrder({fd2: true, all: false}, false, true, execaSync));33test('buffer: {fd1, stdout}, sync', () => testPriorityOrder({fd1: false, stdout: true}, true, true, execaSync));34test('buffer: {all, stdout}, sync', () => testPriorityOrder({all: false, stdout: true}, true, false, execaSync));35test('buffer: {all, fd1}, sync', () => testPriorityOrder({all: false, fd1: true}, true, false, execaSync));36test('buffer: {fd2, stderr}, sync', () => testPriorityOrder({fd2: false, stderr: true}, true, true, execaSync));37test('buffer: {all, stderr}, sync', () => testPriorityOrder({all: false, stderr: true}, false, true, execaSync));38test('buffer: {all, fd2}, sync', () => testPriorityOrder({all: false, fd2: true}, false, true, execaSync));