Sorry this is not an issue, just a question. I would like not to spawn new processes but use the same parent process stdin and stdout streams. In my case I would like just to use suppose in integration tests but, instead spawning new processes, call my functions (that perform some interactive cmdline stuff).
I tried with something like the following but without luck:
process.stdout
.pipe(SupposeStream())
.when('Hi')
.respond('Bye')
.pipe(process.stdin)
// the following stdout would be the function I would like to test. suppose should respond with Bye but is not :(
console.log('Hi')
setTimeout(() => {
console.log('Hi')
}, 1000)
Do you know If I'm missing something? Thanks and BTW great project
Sorry this is not an issue, just a question. I would like not to spawn new processes but use the same parent process stdin and stdout streams. In my case I would like just to use suppose in integration tests but, instead spawning new processes, call my functions (that perform some interactive cmdline stuff).
I tried with something like the following but without luck:
Do you know If I'm missing something? Thanks and BTW great project