generator-all.js
This file
Path
test/transform/generator-all.js
243 lines · 25.5 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
line 1why, one step back1import assert from 'node:assert/strict';100% test coverage (#1018)ehmickybefore adoption9f65b86
line 2why, one step back2import {Buffer} from 'node:buffer';TweaksSindre Sorhusbefore adoption698a1b8
line 3why, one step back3import test from 'node:test';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 4–57why, one step back4import {execa, execaSync} from '../../index.js';5import {setFixtureDirectory} from '../helpers/fixtures-directory.js';6import {foobarObject} from '../helpers/input.js';7import {8 outputObjectGenerator,9 uppercaseGenerator,10 uppercaseBufferGenerator,11} from '../helpers/generator.js';1213setFixtureDirectory();1415const textEncoder = new TextEncoder();1617const getAllStdioOption = (stdioOption, encoding, objectMode) => {18 if (stdioOption) {19 return 'pipe';20 }2122 if (objectMode) {23 return outputObjectGenerator();24 }2526 return encoding === 'utf8' ? uppercaseGenerator() : uppercaseBufferGenerator();27};2829const getStdoutStderrOutput = ({output, stdioOption, encoding, objectMode, lines}) => {30 if (objectMode && !stdioOption) {31 return encoding === 'utf8' ? [foobarObject, foobarObject] : [foobarObject];32 }3334 const stdioOutput = stdioOption ? output : output.toUpperCase();3536 if (encoding === 'hex') {37 return Buffer.from(stdioOutput).toString('hex');38 }3940 if (encoding === 'buffer') {41 return textEncoder.encode(stdioOutput);42 }4344 return lines ? stdioOutput.trim().split('\n').map(string => `${string}\n`) : stdioOutput;45};4647const getAllOutput = ({stdoutOutput, stderrOutput, encoding, objectMode, lines}) => {48 if (objectMode || (lines && encoding === 'utf8')) {49 return [stdoutOutput, stderrOutput].flat();50 }5152 return encoding === 'buffer'53 ? new Uint8Array([...stdoutOutput, ...stderrOutput])54 : `${stdoutOutput}${stderrOutput}`;55};5657// eslint-disable-next-line max-paramsTweaksSindre Sorhusbefore adoption698a1b8
line 58why, one step back58const testGeneratorAll = async (reject, encoding, objectMode, stdoutOption, stderrOption, lines, execaMethod) => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 59–76why, one step back59 const fixtureName = reject ? 'all.js' : 'all-fail.js';60 const {stdout, stderr, all} = await execaMethod(fixtureName, {61 all: true,62 reject,63 stdout: getAllStdioOption(stdoutOption, encoding, objectMode),64 stderr: getAllStdioOption(stderrOption, encoding, objectMode),65 encoding,66 lines,67 stripFinalNewline: false,68 });6970 const stdoutOutput = getStdoutStderrOutput({71 output: 'std\nout\n',72 stdioOption: stdoutOption,73 encoding,74 objectMode,75 lines,76 });TweaksSindre Sorhusbefore adoption698a1b8
line 77why, one step back77 assert.deepEqual(stdout, stdoutOutput);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 78–84why, one step back78 const stderrOutput = getStdoutStderrOutput({79 output: 'std\nerr\n',80 stdioOption: stderrOption,81 encoding,82 objectMode,83 lines,84 });TweaksSindre Sorhusbefore adoption698a1b8
line 85why, one step back85 assert.deepEqual(stderr, stderrOutput);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 86–93why, one step back86 const allOutput = getAllOutput({87 stdoutOutput,88 stderrOutput,89 encoding,90 objectMode,91 lines,92 });93 if (Array.isArray(all) && Array.isArray(allOutput)) {TweaksSindre Sorhusbefore adoption698a1b8
line 94why, one step back94 assert.deepEqual([...all].sort(), [...allOutput].sort());100% test coverage (#1018)ehmickybefore adoption9f65b86
line 95why, one step back95 } else {TweaksSindre Sorhusbefore adoption698a1b8
line 96why, one step back96 assert.deepEqual(all, allOutput);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 97–99why, one step back97 }98};99TweaksSindre Sorhusbefore adoption698a1b8
lines 100–243why, one step back100test('Can use generators with result.all = transform + transform', () => testGeneratorAll(true, 'utf8', false, false, false, false, execa));101test('Can use generators with error.all = transform + transform', () => testGeneratorAll(false, 'utf8', false, false, false, false, execa));102test('Can use generators with result.all = transform + transform, encoding "buffer"', () => testGeneratorAll(true, 'buffer', false, false, false, false, execa));103test('Can use generators with error.all = transform + transform, encoding "buffer"', () => testGeneratorAll(false, 'buffer', false, false, false, false, execa));104test('Can use generators with result.all = transform + transform, encoding "hex"', () => testGeneratorAll(true, 'hex', false, false, false, false, execa));105test('Can use generators with error.all = transform + transform, encoding "hex"', () => testGeneratorAll(false, 'hex', false, false, false, false, execa));106test('Can use generators with result.all = transform + pipe', () => testGeneratorAll(true, 'utf8', false, false, true, false, execa));107test('Can use generators with error.all = transform + pipe', () => testGeneratorAll(false, 'utf8', false, false, true, false, execa));108test('Can use generators with result.all = transform + pipe, encoding "buffer"', () => testGeneratorAll(true, 'buffer', false, false, true, false, execa));109test('Can use generators with error.all = transform + pipe, encoding "buffer"', () => testGeneratorAll(false, 'buffer', false, false, true, false, execa));110test('Can use generators with result.all = transform + pipe, encoding "hex"', () => testGeneratorAll(true, 'hex', false, false, true, false, execa));111test('Can use generators with error.all = transform + pipe, encoding "hex"', () => testGeneratorAll(false, 'hex', false, false, true, false, execa));112test('Can use generators with result.all = pipe + transform', () => testGeneratorAll(true, 'utf8', false, true, false, false, execa));113test('Can use generators with error.all = pipe + transform', () => testGeneratorAll(false, 'utf8', false, true, false, false, execa));114test('Can use generators with result.all = pipe + transform, encoding "buffer"', () => testGeneratorAll(true, 'buffer', false, true, false, false, execa));115test('Can use generators with error.all = pipe + transform, encoding "buffer"', () => testGeneratorAll(false, 'buffer', false, true, false, false, execa));116test('Can use generators with result.all = pipe + transform, encoding "hex"', () => testGeneratorAll(true, 'hex', false, true, false, false, execa));117test('Can use generators with error.all = pipe + transform, encoding "hex"', () => testGeneratorAll(false, 'hex', false, true, false, false, execa));118test('Can use generators with result.all = transform + transform, objectMode', () => testGeneratorAll(true, 'utf8', true, false, false, false, execa));119test('Can use generators with error.all = transform + transform, objectMode', () => testGeneratorAll(false, 'utf8', true, false, false, false, execa));120test('Can use generators with result.all = transform + transform, objectMode, encoding "buffer"', () => testGeneratorAll(true, 'buffer', true, false, false, false, execa));121test('Can use generators with error.all = transform + transform, objectMode, encoding "buffer"', () => testGeneratorAll(false, 'buffer', true, false, false, false, execa));122test('Can use generators with result.all = transform + transform, objectMode, encoding "hex"', () => testGeneratorAll(true, 'hex', true, false, false, false, execa));123test('Can use generators with error.all = transform + transform, objectMode, encoding "hex"', () => testGeneratorAll(false, 'hex', true, false, false, false, execa));124test('Can use generators with result.all = transform + pipe, objectMode', () => testGeneratorAll(true, 'utf8', true, false, true, false, execa));125test('Can use generators with error.all = transform + pipe, objectMode', () => testGeneratorAll(false, 'utf8', true, false, true, false, execa));126test('Can use generators with result.all = transform + pipe, objectMode, encoding "buffer"', () => testGeneratorAll(true, 'buffer', true, false, true, false, execa));127test('Can use generators with error.all = transform + pipe, objectMode, encoding "buffer"', () => testGeneratorAll(false, 'buffer', true, false, true, false, execa));128test('Can use generators with result.all = transform + pipe, objectMode, encoding "hex"', () => testGeneratorAll(true, 'hex', true, false, true, false, execa));129test('Can use generators with error.all = transform + pipe, objectMode, encoding "hex"', () => testGeneratorAll(false, 'hex', true, false, true, false, execa));130test('Can use generators with result.all = pipe + transform, objectMode', () => testGeneratorAll(true, 'utf8', true, true, false, false, execa));131test('Can use generators with error.all = pipe + transform, objectMode', () => testGeneratorAll(false, 'utf8', true, true, false, false, execa));132test('Can use generators with result.all = pipe + transform, objectMode, encoding "buffer"', () => testGeneratorAll(true, 'buffer', true, true, false, false, execa));133test('Can use generators with error.all = pipe + transform, objectMode, encoding "buffer"', () => testGeneratorAll(false, 'buffer', true, true, false, false, execa));134test('Can use generators with result.all = pipe + transform, objectMode, encoding "hex"', () => testGeneratorAll(true, 'hex', true, true, false, false, execa));135test('Can use generators with error.all = pipe + transform, objectMode, encoding "hex"', () => testGeneratorAll(false, 'hex', true, true, false, false, execa));136test('Can use generators with result.all = transform + transform, sync', () => testGeneratorAll(true, 'utf8', false, false, false, false, execaSync));137test('Can use generators with error.all = transform + transform, sync', () => testGeneratorAll(false, 'utf8', false, false, false, false, execaSync));138test('Can use generators with result.all = transform + transform, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', false, false, false, false, execaSync));139test('Can use generators with error.all = transform + transform, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', false, false, false, false, execaSync));140test('Can use generators with result.all = transform + transform, encoding "hex", sync', () => testGeneratorAll(true, 'hex', false, false, false, false, execaSync));141test('Can use generators with error.all = transform + transform, encoding "hex", sync', () => testGeneratorAll(false, 'hex', false, false, false, false, execaSync));142test('Can use generators with result.all = transform + pipe, sync', () => testGeneratorAll(true, 'utf8', false, false, true, false, execaSync));143test('Can use generators with error.all = transform + pipe, sync', () => testGeneratorAll(false, 'utf8', false, false, true, false, execaSync));144test('Can use generators with result.all = transform + pipe, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', false, false, true, false, execaSync));145test('Can use generators with error.all = transform + pipe, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', false, false, true, false, execaSync));146test('Can use generators with result.all = transform + pipe, encoding "hex", sync', () => testGeneratorAll(true, 'hex', false, false, true, false, execaSync));147test('Can use generators with error.all = transform + pipe, encoding "hex", sync', () => testGeneratorAll(false, 'hex', false, false, true, false, execaSync));148test('Can use generators with result.all = pipe + transform, sync', () => testGeneratorAll(true, 'utf8', false, true, false, false, execaSync));149test('Can use generators with error.all = pipe + transform, sync', () => testGeneratorAll(false, 'utf8', false, true, false, false, execaSync));150test('Can use generators with result.all = pipe + transform, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', false, true, false, false, execaSync));151test('Can use generators with error.all = pipe + transform, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', false, true, false, false, execaSync));152test('Can use generators with result.all = pipe + transform, encoding "hex", sync', () => testGeneratorAll(true, 'hex', false, true, false, false, execaSync));153test('Can use generators with error.all = pipe + transform, encoding "hex", sync', () => testGeneratorAll(false, 'hex', false, true, false, false, execaSync));154test('Can use generators with result.all = transform + transform, objectMode, sync', () => testGeneratorAll(true, 'utf8', true, false, false, false, execaSync));155test('Can use generators with error.all = transform + transform, objectMode, sync', () => testGeneratorAll(false, 'utf8', true, false, false, false, execaSync));156test('Can use generators with result.all = transform + transform, objectMode, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', true, false, false, false, execaSync));157test('Can use generators with error.all = transform + transform, objectMode, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', true, false, false, false, execaSync));158test('Can use generators with result.all = transform + transform, objectMode, encoding "hex", sync', () => testGeneratorAll(true, 'hex', true, false, false, false, execaSync));159test('Can use generators with error.all = transform + transform, objectMode, encoding "hex", sync', () => testGeneratorAll(false, 'hex', true, false, false, false, execaSync));160test('Can use generators with result.all = transform + pipe, objectMode, sync', () => testGeneratorAll(true, 'utf8', true, false, true, false, execaSync));161test('Can use generators with error.all = transform + pipe, objectMode, sync', () => testGeneratorAll(false, 'utf8', true, false, true, false, execaSync));162test('Can use generators with result.all = transform + pipe, objectMode, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', true, false, true, false, execaSync));163test('Can use generators with error.all = transform + pipe, objectMode, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', true, false, true, false, execaSync));164test('Can use generators with result.all = transform + pipe, objectMode, encoding "hex", sync', () => testGeneratorAll(true, 'hex', true, false, true, false, execaSync));165test('Can use generators with error.all = transform + pipe, objectMode, encoding "hex", sync', () => testGeneratorAll(false, 'hex', true, false, true, false, execaSync));166test('Can use generators with result.all = pipe + transform, objectMode, sync', () => testGeneratorAll(true, 'utf8', true, true, false, false, execaSync));167test('Can use generators with error.all = pipe + transform, objectMode, sync', () => testGeneratorAll(false, 'utf8', true, true, false, false, execaSync));168test('Can use generators with result.all = pipe + transform, objectMode, encoding "buffer", sync', () => testGeneratorAll(true, 'buffer', true, true, false, false, execaSync));169test('Can use generators with error.all = pipe + transform, objectMode, encoding "buffer", sync', () => testGeneratorAll(false, 'buffer', true, true, false, false, execaSync));170test('Can use generators with result.all = pipe + transform, objectMode, encoding "hex", sync', () => testGeneratorAll(true, 'hex', true, true, false, false, execaSync));171test('Can use generators with error.all = pipe + transform, objectMode, encoding "hex", sync', () => testGeneratorAll(false, 'hex', true, true, false, false, execaSync));172test('Can use generators with result.all = transform + transform, lines', () => testGeneratorAll(true, 'utf8', false, false, false, true, execa));173test('Can use generators with error.all = transform + transform, lines', () => testGeneratorAll(false, 'utf8', false, false, false, true, execa));174test('Can use generators with result.all = transform + transform, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', false, false, false, true, execa));175test('Can use generators with error.all = transform + transform, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', false, false, false, true, execa));176test('Can use generators with result.all = transform + transform, encoding "hex", lines', () => testGeneratorAll(true, 'hex', false, false, false, true, execa));177test('Can use generators with error.all = transform + transform, encoding "hex", lines', () => testGeneratorAll(false, 'hex', false, false, false, true, execa));178test('Can use generators with result.all = transform + pipe, lines', () => testGeneratorAll(true, 'utf8', false, false, true, true, execa));179test('Can use generators with error.all = transform + pipe, lines', () => testGeneratorAll(false, 'utf8', false, false, true, true, execa));180test('Can use generators with result.all = transform + pipe, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', false, false, true, true, execa));181test('Can use generators with error.all = transform + pipe, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', false, false, true, true, execa));182test('Can use generators with result.all = transform + pipe, encoding "hex", lines', () => testGeneratorAll(true, 'hex', false, false, true, true, execa));183test('Can use generators with error.all = transform + pipe, encoding "hex", lines', () => testGeneratorAll(false, 'hex', false, false, true, true, execa));184test('Can use generators with result.all = pipe + transform, lines', () => testGeneratorAll(true, 'utf8', false, true, false, true, execa));185test('Can use generators with error.all = pipe + transform, lines', () => testGeneratorAll(false, 'utf8', false, true, false, true, execa));186test('Can use generators with result.all = pipe + transform, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', false, true, false, true, execa));187test('Can use generators with error.all = pipe + transform, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', false, true, false, true, execa));188test('Can use generators with result.all = pipe + transform, encoding "hex", lines', () => testGeneratorAll(true, 'hex', false, true, false, true, execa));189test('Can use generators with error.all = pipe + transform, encoding "hex", lines', () => testGeneratorAll(false, 'hex', false, true, false, true, execa));190test('Can use generators with result.all = transform + transform, objectMode, lines', () => testGeneratorAll(true, 'utf8', true, false, false, true, execa));191test('Can use generators with error.all = transform + transform, objectMode, lines', () => testGeneratorAll(false, 'utf8', true, false, false, true, execa));192test('Can use generators with result.all = transform + transform, objectMode, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', true, false, false, true, execa));193test('Can use generators with error.all = transform + transform, objectMode, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', true, false, false, true, execa));194test('Can use generators with result.all = transform + transform, objectMode, encoding "hex", lines', () => testGeneratorAll(true, 'hex', true, false, false, true, execa));195test('Can use generators with error.all = transform + transform, objectMode, encoding "hex", lines', () => testGeneratorAll(false, 'hex', true, false, false, true, execa));196test('Can use generators with result.all = transform + pipe, objectMode, lines', () => testGeneratorAll(true, 'utf8', true, false, true, true, execa));197test('Can use generators with error.all = transform + pipe, objectMode, lines', () => testGeneratorAll(false, 'utf8', true, false, true, true, execa));198test('Can use generators with result.all = transform + pipe, objectMode, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', true, false, true, true, execa));199test('Can use generators with error.all = transform + pipe, objectMode, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', true, false, true, true, execa));200test('Can use generators with result.all = transform + pipe, objectMode, encoding "hex", lines', () => testGeneratorAll(true, 'hex', true, false, true, true, execa));201test('Can use generators with error.all = transform + pipe, objectMode, encoding "hex", lines', () => testGeneratorAll(false, 'hex', true, false, true, true, execa));202test('Can use generators with result.all = pipe + transform, objectMode, lines', () => testGeneratorAll(true, 'utf8', true, true, false, true, execa));203test('Can use generators with error.all = pipe + transform, objectMode, lines', () => testGeneratorAll(false, 'utf8', true, true, false, true, execa));204test('Can use generators with result.all = pipe + transform, objectMode, encoding "buffer", lines', () => testGeneratorAll(true, 'buffer', true, true, false, true, execa));205test('Can use generators with error.all = pipe + transform, objectMode, encoding "buffer", lines', () => testGeneratorAll(false, 'buffer', true, true, false, true, execa));206test('Can use generators with result.all = pipe + transform, objectMode, encoding "hex", lines', () => testGeneratorAll(true, 'hex', true, true, false, true, execa));207test('Can use generators with error.all = pipe + transform, objectMode, encoding "hex", lines', () => testGeneratorAll(false, 'hex', true, true, false, true, execa));208test('Can use generators with result.all = transform + transform, sync, lines', () => testGeneratorAll(true, 'utf8', false, false, false, true, execaSync));209test('Can use generators with error.all = transform + transform, sync, lines', () => testGeneratorAll(false, 'utf8', false, false, false, true, execaSync));210test('Can use generators with result.all = transform + transform, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', false, false, false, true, execaSync));211test('Can use generators with error.all = transform + transform, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', false, false, false, true, execaSync));212test('Can use generators with result.all = transform + transform, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', false, false, false, true, execaSync));213test('Can use generators with error.all = transform + transform, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', false, false, false, true, execaSync));214test('Can use generators with result.all = transform + pipe, sync, lines', () => testGeneratorAll(true, 'utf8', false, false, true, true, execaSync));215test('Can use generators with error.all = transform + pipe, sync, lines', () => testGeneratorAll(false, 'utf8', false, false, true, true, execaSync));216test('Can use generators with result.all = transform + pipe, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', false, false, true, true, execaSync));217test('Can use generators with error.all = transform + pipe, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', false, false, true, true, execaSync));218test('Can use generators with result.all = transform + pipe, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', false, false, true, true, execaSync));219test('Can use generators with error.all = transform + pipe, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', false, false, true, true, execaSync));220test('Can use generators with result.all = pipe + transform, sync, lines', () => testGeneratorAll(true, 'utf8', false, true, false, true, execaSync));221test('Can use generators with error.all = pipe + transform, sync, lines', () => testGeneratorAll(false, 'utf8', false, true, false, true, execaSync));222test('Can use generators with result.all = pipe + transform, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', false, true, false, true, execaSync));223test('Can use generators with error.all = pipe + transform, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', false, true, false, true, execaSync));224test('Can use generators with result.all = pipe + transform, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', false, true, false, true, execaSync));225test('Can use generators with error.all = pipe + transform, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', false, true, false, true, execaSync));226test('Can use generators with result.all = transform + transform, objectMode, sync, lines', () => testGeneratorAll(true, 'utf8', true, false, false, true, execaSync));227test('Can use generators with error.all = transform + transform, objectMode, sync, lines', () => testGeneratorAll(false, 'utf8', true, false, false, true, execaSync));228test('Can use generators with result.all = transform + transform, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', true, false, false, true, execaSync));229test('Can use generators with error.all = transform + transform, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', true, false, false, true, execaSync));230test('Can use generators with result.all = transform + transform, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', true, false, false, true, execaSync));231test('Can use generators with error.all = transform + transform, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', true, false, false, true, execaSync));232test('Can use generators with result.all = transform + pipe, objectMode, sync, lines', () => testGeneratorAll(true, 'utf8', true, false, true, true, execaSync));233test('Can use generators with error.all = transform + pipe, objectMode, sync, lines', () => testGeneratorAll(false, 'utf8', true, false, true, true, execaSync));234test('Can use generators with result.all = transform + pipe, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', true, false, true, true, execaSync));235test('Can use generators with error.all = transform + pipe, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', true, false, true, true, execaSync));236test('Can use generators with result.all = transform + pipe, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', true, false, true, true, execaSync));237test('Can use generators with error.all = transform + pipe, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', true, false, true, true, execaSync));238test('Can use generators with result.all = pipe + transform, objectMode, sync, lines', () => testGeneratorAll(true, 'utf8', true, true, false, true, execaSync));239test('Can use generators with error.all = pipe + transform, objectMode, sync, lines', () => testGeneratorAll(false, 'utf8', true, true, false, true, execaSync));240test('Can use generators with result.all = pipe + transform, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(true, 'buffer', true, true, false, true, execaSync));241test('Can use generators with error.all = pipe + transform, objectMode, encoding "buffer", sync, lines', () => testGeneratorAll(false, 'buffer', true, true, false, true, execaSync));242test('Can use generators with result.all = pipe + transform, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(true, 'hex', true, true, false, true, execaSync));243test('Can use generators with error.all = pipe + transform, objectMode, encoding "hex", sync, lines', () => testGeneratorAll(false, 'hex', true, true, false, true, execaSync));