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

Streams: Modify tests to expect abort reason passthrough #9926

Merged

Conversation

Projects
None yet
4 participants
@ricea
Copy link
Contributor

ricea commented Mar 8, 2018

This tests the changes in whatwg/streams#903.

Replace expectations that a TypeError will be stored after abort() is
called with with expectations that the reason passed to abort() will be
stored instead.

Also add a test of the stored error on the readable side of a
TransformStream after abort() has been called on the writable size. This
was not explicitly tested.

Also fix a bug in the general.js test: it didn't wrap a call to
assert_unreached properly, so a failure would have shown up as an
unhandled rejection rather than being reported properly.

Streams: Modify tests to expect abort reason passthrough
This tests the changes in whatwg/streams#903.

Replace expectations that a TypeError will be stored after abort() is
called with with expectations that the reason passed to abort() will be
stored instead.

Also add a test of the stored error on the readable side of a
TransformStream after abort() has been called on the writable size. This
was not explicitly tested.

Also fix a bug in the general.js test: it didn't wrap a call to
assert_unreached properly, so a failure would have shown up as an
unhandled rejection rather than being reported properly.
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 8, 2018

Build PASSED

Started: 2018-03-08 18:55:16
Finished: 2018-03-08 19:22:36

Failing Jobs

  • safari:11.0
  • MicrosoftEdge:16.16299

View more information about this build on:

@domenic

domenic approved these changes Mar 9, 2018

Copy link
Member

domenic left a comment

Could we add a few smoke tests for passing through undefined implicitly (via abort()), undefined explicitly, and for a string? Definitely people should be using Error instances, but we should test the degenerate use cases.

@ricea

This comment has been minimized.

Copy link
Contributor Author

ricea commented Mar 9, 2018

I will add tests for degeneracy in a followup change.

@ricea ricea merged commit 81468a0 into web-platform-tests:master Mar 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ricea ricea deleted the ricea:streams-abort-reason-passthru branch Mar 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.