test: copyedit test-tls-psk-alpn-callback-exception-handling#63485
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63485 +/- ##
==========================================
- Coverage 90.24% 90.22% -0.03%
==========================================
Files 741 741
Lines 241665 241665
Branches 45543 45538 -5
==========================================
- Hits 218092 218043 -49
- Misses 15105 15158 +53
+ Partials 8468 8464 -4 🚀 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
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
da7d903 to
8a1f4ec
Compare
|
Landed in 824bc66 |
Make the assertions more intention revealing