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
Enable asyc bootsrap file #303
Conversation
+1 |
1 similar comment
+1 |
👍 |
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.
Thanks, really useful PR. I'd ask some minor improvements to be done before it can be merged.
if (this.config.bootstrap && fileExists(fsPath.join(codecept_dir, this.config.bootstrap))) { | ||
require(fsPath.join(codecept_dir, this.config.bootstrap)); | ||
var bootsrap = require(fsPath.join(codecept_dir, this.config.bootstrap)); |
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.
bootsrap
var bootsrap = require(fsPath.join(codecept_dir, this.config.bootstrap)); | ||
if (typeof bootsrap === 'function') { | ||
bootsrap(callback); | ||
} else { |
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.
don't do else, just return
methods.push(` ${(actionAlias)}: (${params}) => any; \n`); | ||
actions[actionAlias] = 1 | ||
codecept.init(testsPath, function(err) { | ||
if (!err) { |
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.
please don't add another nesting level this way. Probably here you can do
if (err) {
// maybe we should do smth with err here?
return;
}
// continue basic flow
No description provided.