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

Ignore while a promise returns inside a test with a value. Only watch for rejection #701

Merged
merged 1 commit into from May 1, 2017

Conversation

@corbinu
Copy link
Contributor

corbinu commented May 1, 2017

Addresses #700 by adding a new test for a resolving promise and then updating the runner to ignore resolved values. Let me know if there are any changes you want me to make :)

@@ -743,7 +743,11 @@ internals.protect = function (item, state, callback) {
if (itemResult &&
itemResult.then instanceof Function) {

itemResult.then(done, done);
itemResult.then(() => {

This comment has been minimized.

Copy link
@Marsup

Marsup May 1, 2017

Member

Just itemResult.then(() => done(), done).

@Marsup Marsup added the bug label May 1, 2017
@corbinu

This comment has been minimized.

Copy link
Contributor Author

corbinu commented May 1, 2017

@Marsup Your suggested change seems to have caused 2 other tests to fail. Thoughts?

@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented May 1, 2017

Your change doesn't look remotely similar to my suggestion :)

… for rejection

Simplify

Try again
@Marsup
Marsup approved these changes May 1, 2017
@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented May 1, 2017

Thanks ! I'll let @geek merge and release as it's not mine to make.

@geek geek added this to the 13.0.4 milestone May 1, 2017
@geek geek self-assigned this May 1, 2017
@geek geek merged commit f89a574 into hapijs:master May 1, 2017
2 checks passed
2 checks passed
Node Security No known vulnerabilities found
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.