MCPcopy Index your code
hub / github.com/nodejs/node / checkOutput

Function checkOutput

test/parallel/test-snapshot-dns-resolve-localhost.js:18–25  ·  view source on GitHub ↗
(stderr, stdout)

Source from the content-addressed store, hash-verified

16
17tmpdir.refresh();
18function checkOutput(stderr, stdout) {
19 // We allow failures as it's not always possible to resolve localhost.
20 // Functional tests are done in test/internet instead.
21 if (!stderr.startsWith('error:')) {
22 assert(stdout.includes('addresses: ['));
23 assert.strictEqual(stdout.trim().split('\n').length, 1);
24 }
25}
26{
27 const { stderr, stdout } = buildSnapshot(entry, env);
28 checkOutput(stderr, stdout);

Calls 3

includesMethod · 0.80
assertFunction · 0.50
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…