Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

test_node: throw on unhandled promise rejections #1152

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Jul 10, 2018

Description

This makes test-node treat unhandled rejections as errors.

Refs: https://nodejs.org/api/process.html#process_event_unhandledrejection


For repository owners only:

Please remember to apply all applicable tags to your pull request.
Tags: FEATURE, BREAKING, BUG, PERF, DEV, DOC, SECURITY

For more info see: https://github.com/tensorflow/tfjs/blob/master/DEVELOPMENT.md


This change is Reviewable

@ChALkeR
Copy link
Contributor Author

ChALkeR commented Jul 10, 2018

Depends on #1151 to fix those errors, until that, tests will fail.

I filed this as a separate PR because I am not sure if #1151 is the correct way to fix those issues, but I don't want this testcase fix to be lost.

This makes `test-node` treat unhandled rejections as errors.
@ChALkeR
Copy link
Contributor Author

ChALkeR commented Jul 10, 2018

#1151 landed, I rebased this. Tests should pass now.

@dsmilkov dsmilkov self-requested a review July 10, 2018 14:52
Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

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

This is excellent. Can you make the same change to https://github.com/tensorflow/tfjs-node/blob/master/src/run_tests.ts (another PR).

Reviewed 1 of 1 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @dsmilkov)

@dsmilkov dsmilkov merged commit 23b93ec into tensorflow:master Jul 10, 2018
ChALkeR added a commit to ChALkeR/tfjs-node that referenced this pull request Jul 10, 2018
nkreeger pushed a commit to tensorflow/tfjs-node that referenced this pull request Jul 10, 2018
This makes 'test' script treat unhandled rejections as errors.

Refs: tensorflow/tfjs-core#1152
Refs: https://nodejs.org/api/process.html#process_event_unhandledrejection

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/118)
<!-- Reviewable:end -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants