- From: Domenic Denicola <notifications@github.com>
- Date: Fri, 07 Oct 2016 11:36:43 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Friday, 7 October 2016 18:37:21 UTC
domenic commented on this pull request. > + + const ws = recordingWritableStream({ + close() { + throw error1; + } + }); + + const writer = ws.getWriter(); + + return promise_rejects(t, error1, writer.close(), 'close() promise must reject with the thrown error') + .then(() => promise_rejects(t, error1, writer.ready, 'ready promise must reject with the thrown error')) + .then(() => { + assert_array_equals(ws.events, ['close']); + }); + +}, 'Underlying sink close: throwing method'); Hmm. For certain types of tests I prefer the description to describe the situation being tested, and the assertions themselves to contain the "must"s. Let me tweak this though since I guess most tests are moving in that direction. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/526
Received on Friday, 7 October 2016 18:37:21 UTC