-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Conversation
@@ -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) { |
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.
pfff, please use arrow functions?
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; }); |
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.
Happy @cpojer?
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.
not really. It should be resolve => this._resolve = resolve
:P Merged it anyway #yolo
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.
Promise.defer shouldn't exist, don't use it
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. |
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.