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

Method wait

test/parallel/test-repl-top-level-await.js:36–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 async wait() {
37 if (this.waitingForResponse) {
38 throw new Error('Currently waiting for response to another command');
39 }
40 this.lines = [''];
41 for await (const [line] of events.on(this, 'line')) {
42 if (line.includes(PROMPT)) {
43 return this.lines;
44 }
45 }
46 }
47}
48
49const putIn = new REPLStream();

Callers 1

runAndWaitFunction · 0.45

Calls 2

includesMethod · 0.80
onMethod · 0.45

Tested by

no test coverage detected