jprichardson / jprichardson/node-suppose
Is it possible to suppose on the current process IO ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 255
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the shown SupposeStream pipeline and Node.js process.stdin/process.stdout behavior. Determine whether the existing-process integration-test scenario is supported, and document the supported usage or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100