MCPcopy
hub / github.com/SBoudrias/Inquirer.js / StubEventuallyFailingPrompt

Class StubEventuallyFailingPrompt

packages/inquirer/inquirer.test.ts:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67class StubEventuallyFailingPrompt {
68 timeout?: NodeJS.Timeout;
69
70 run() {
71 return new Promise((_, reject) => {
72 this.timeout = setTimeout(() => {
73 reject(new Error('This test prompt always reject'));
74 }, 1000);
75 });
76 }
77
78 close() {
79 clearTimeout(this.timeout);
80 }
81}
82
83function createTestPromptModule(options: StreamOptions = {}) {
84 const module = inquirer.createPromptModule<TestQuestions>({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected