Skip to content
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

Merged
merged 2 commits into from Dec 6, 2016
Merged

Enable asyc bootsrap file #303

merged 2 commits into from Dec 6, 2016

Conversation

abachar
Copy link
Contributor

@abachar abachar commented Nov 24, 2016

No description provided.

@hyahyaoui
Copy link

+1

1 similar comment
@igorlovich
Copy link

+1

@DavertMik
Copy link
Contributor

👍

Copy link
Contributor

@DavertMik DavertMik left a 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));
Copy link
Contributor

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 {
Copy link
Contributor

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) {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants