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

Promise.defer shouldn't exist, don't use it #546

Merged
merged 1 commit into from
Oct 10, 2015
Merged

Conversation

zpao
Copy link
Contributor

@zpao zpao commented Oct 8, 2015

I think I understand what's going on and did this right but maybe not…

While v8 currently supports Promise.defer, it won't always.

@@ -25,7 +25,9 @@ function JasmineReporter(config) {
jasmine.Reporter.call(this);
this._config = config || {};
this._logs = [];
this._resultsDeferred = Promise.defer();
this._resultsPromise = new Promise(function(resolve) {
Copy link
Member

Choose a reason for hiding this comment

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

pfff, please use arrow functions?

@cpojer
Copy link
Member

cpojer commented Oct 9, 2015

sounds good!

@@ -25,7 +25,7 @@ function JasmineReporter(config) {
jasmine.Reporter.call(this);
this._config = config || {};
this._logs = [];
this._resultsDeferred = Promise.defer();
this._resultsPromise = new Promise((resolve) => { this._resolve = resolve; });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy @cpojer?

Copy link
Member

Choose a reason for hiding this comment

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

not really. It should be resolve => this._resolve = resolve :P Merged it anyway #yolo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

♥️ parens

cpojer added a commit that referenced this pull request Oct 10, 2015
Promise.defer shouldn't exist, don't use it
@cpojer cpojer merged commit 744f69d into jestjs:master Oct 10, 2015
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants