Closed chenglou closed 10 years ago
Tried it for a whole day, the module's incredibly buggy and not really well maintained imo. Here's the result:
mocha
(with PR #4), then wait for lines and send lines. This is the only working option, except it errors twice out of three for mysterious reasons. Also, even if this works 100% it's not optimal as the module swallows the output and you have no idea what happens afterward beside checking some output files.mocha
, which in turn runs the two test files. In test-creation.js
, I spawn a node createTestFolder.js
(in which there's the current helpers.testDirectory(...)
script). This procedure fails to send line to stdin
.yo react-library
; now it hangs.I'll submit a new commit in that PR. The index.js
file corresponds to 1; the rest, 2. 3 Isn't included.
Getting really weird so for now I'll leave this issue be.
The only real reason why the tests are failing is because
npm init
is run right after the generator's other works, prompting for input. After two seconds the test times out and fails.@petehunt I'm wondering if there's a way to send random enter keys to the terminal to step through package.json's creation programmatically.