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

Function settle

test/sequential/test-watch-mode.mjs:61–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 stderr = '';
60 } else if (data.startsWith('Failed running')) {
61 const settle = () => {
62 if (shouldFail) {
63 future.resolve({ stderr, stdout });
64 } else {
65 future.reject({ stderr, stdout });
66 }
67 future = Promise.withResolvers();
68 stdout = [];
69 stderr = '';
70 };
71 // If stderr is empty, wait for it to receive data before settling.
72 // This handles the race condition where stdout arrives before stderr.
73 if (stderr === '') {

Callers 1

runFunction · 0.70

Calls 2

rejectMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…