MCPcopy
hub / github.com/sindresorhus/execa / testStdoutFile

Function testStdoutFile

test/verbose/output-noop.js:47–59  ·  view source on GitHub ↗
(t, isSync, optionsFixture)

Source from the content-addressed store, hash-verified

45test('Does not print stdout, .pipe(subprocess)', testNoOutputStream, 'nested-pipe-subprocess.js');
46
47const testStdoutFile = async (t, isSync, optionsFixture) => {
48 const file = tempfile();
49 const {stderr} = await nestedSubprocess('noop.js', [foobarString], {
50 verbose: 'full',
51 stdout: {file},
52 isSync,
53 optionsFixture,
54 });
55 t.is(getOutputLine(stderr), undefined);
56 const contents = await readFile(file, 'utf8');
57 t.is(contents.trim(), foobarString);
58 await rm(file);
59};
60
61test('Does not print stdout, stdout { file }', testStdoutFile, false);
62test('Does not print stdout, stdout fileUrl', testStdoutFile, false, 'file-url.js');

Callers

nothing calls this directly

Calls 2

nestedSubprocessFunction · 0.90
getOutputLineFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…