test: copyedit test-tls-psk-alpn-callback-exception-handling#63485
test: copyedit test-tls-psk-alpn-callback-exception-handling#63485aduh95 wants to merge 1 commit into
test-tls-psk-alpn-callback-exception-handling#63485Conversation
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63485 +/- ##
==========================================
- Coverage 90.14% 90.14% -0.01%
==========================================
Files 718 718
Lines 227734 227734
Branches 42760 42757 -3
==========================================
- Hits 205289 205280 -9
- Misses 14219 14245 +26
+ Partials 8226 8209 -17 🚀 New features to boost your workflow:
|
| server.on('secureConnection', () => { | ||
| reject(new Error('secureConnection should not fire')); | ||
| }); | ||
| server.on('secureConnection', common.mustNotCall('secureConnection listener')); |
There was a problem hiding this comment.
What happens if this fires while promise is being awaited at the end of the test function, and tlsClientError doesn't fire? Seems like the event will be handled outside of the test's promise task, promise won't be resolved or rejected, and the test will hang until timeout?
There was a problem hiding this comment.
Lines 563 to 572 in 5922197
It would throw an unhandled rejection which would terminate the process immediately
In any case, a pending promise is not enough to keep the process alive, so no the test won't hang
Make the assertions more intention revealing