MCPcopy Create free account
hub / github.com/sindresorhus/execa / testMaxBufferUnit

Function testMaxBufferUnit

test/stdio/lines-max-buffer.js:30–35  ·  view source on GitHub ↗
(t, lines)

Source from the content-addressed store, hash-verified

28test('"lines: true" can be above "maxBuffer", fd-specific', testAboveMaxBuffer, {stdout: true});
29
30const testMaxBufferUnit = async (t, lines) => {
31 const {isMaxBuffer, shortMessage, stdout} = await t.throwsAsync(execa('noop-repeat.js', ['1', '...\n'], {lines, maxBuffer}));
32 t.true(isMaxBuffer);
33 assertErrorMessage(t, shortMessage, {length: maxBuffer, unit: 'lines'});
34 t.deepEqual(stdout, ['...', '...']);
35};
36
37test('"maxBuffer" is measured in lines with "lines: true"', testMaxBufferUnit, true);
38test('"maxBuffer" is measured in lines with "lines: true", fd-specific', testMaxBufferUnit, {stdout: true});

Callers

nothing calls this directly

Calls 1

assertErrorMessageFunction · 0.90

Tested by

no test coverage detected