-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell out to cucumber-js #25
Conversation
env: workerEnv, | ||
silent: !this.options.inlineStream | ||
}); | ||
let cucumberPath = './node_modules/.bin/cucumber-js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also just run node .
in node_modules/cucumber rather than having any windows logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this actually works. cucumber.js in the module root isn't actually the module's CLI entry point.
@@ -11,6 +11,7 @@ import options from './fixtures/options'; | |||
describe('Test Handler', function() { | |||
it('should wait for all children to exit before returning', function () { | |||
var opts = options.default; | |||
this.timeout(5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these waits needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default is 2 seconds, but on windows, starting cucumber-js is pretty slow and takes up to 3 or 4 seconds. (it's a test timeout, not a wait)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
return done(result); | ||
}) | ||
.catch(function(err) { | ||
return done({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This object looks duped from the reject in worker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So sometimes while I'm testing something in the worker breaks and throws an exception separately from the reject :-/
this.workers.push(worker); | ||
|
||
return worker.execute() | ||
.then(function(result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the only two missed now I think
👍 |
@midniteio @efokschaner @vsiakka
This replaces the current fork + cucumber-js API approach with directly spawning a new process that shells out to cucumber-js. This way, if cucumber-js ends for any reason (crash, regular test failure, etc.) we'll still detect the process has exited and handle it properly.