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

Tests: Patch mocha bugs and fix broken async flow cases #6157

Merged
merged 59 commits into from May 24, 2019

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented May 20, 2019

Addresses #6116 (not closing yet as there are some further steps to make)

Derives from #6147 (which should be merged first)

Is this ready for review?: YES
Is it a breaking change?: NO

Copy link
Contributor

@pmuens pmuens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great and looks good code-wise.

I just have one question regarding native Promises vs. Bluebird. Should we stick to one convention here? While we don't mix those implementations in one file (which we did and had some race condition bugs resulting from that) it might be worthwhile to settle on one implementation to keep the codebase consistent.

};
const initialSetupDeferred = shouldApplyFsCleanupCheck
? initialGitStatusDeferred
: Promise.resolve();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a question which pops up all the time. Should we consistently use Bluebird or should we mix and match Bluebird with native Promises?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree, and I definitely would not try to mix Bluebird with native promises in framework modules (especially that it may affect long stack traces which become handy)

Still this is an outer stand alone script, that by no means is mixed with framework logic or even invokes framework logic (note tests are run in other processes released with spawn)

It just distributes test runs, and also already uses three dependencies (p-lmit, globby, child-process-ext) which output native promises.

Also at some point (the sooner the better) we should switch to native promises, so configuring it with Bluebird (still partially) will imply an unnecessary need of refactor here.

Therefore I think it's totally fine to stick to native promises in this context.

@medikoo medikoo requested a review from pmuens May 24, 2019 12:19
Copy link
Contributor

@pmuens pmuens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@medikoo medikoo merged commit a5bad90 into master May 24, 2019
@medikoo medikoo deleted the improve-promised-bdd-setup branch May 24, 2019 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants