feat: port test_exception to CTS#43
Conversation
|
@kraenhansen This turned out to be tricky, as this needs to verify an uncaughtException. Thus, forcing another level of process spawning to verify. |
|
This one is tricky, as I don't expect implementors such as emnapi and React Native to support this from their harness implementation 🤔 |
|
@kraenhansen A priority list would have helped. I'm just picking up from the list sequentially. |
|
depends on #54 |
|
@bavulapati similarly to this comment I suggest moving this into draft until the parent PR merge. |
4dfac05 to
94d6582
Compare
94d6582 to
fc17c54
Compare
| @@ -0,0 +1,146 @@ | |||
| 'use strict'; | |||
| // Flags: --expose-gc | |||
There was a problem hiding this comment.
Not needed.
| // Flags: --expose-gc |
| @@ -0,0 +1,9 @@ | |||
| // An exception thrown from a C finalizer during GC surfaces as an uncaught | |||
| // exception on stderr; it runs in a spawned child so the crash doesn't take | |||
There was a problem hiding this comment.
I think we should rewrite the test with onUncaughtException in the harness.
But it seems like this test duplicates with tests/js-native-api/test_reference/test_finalizer.js. Maybe the main difference is that the exception is thrown during addon init. So maybe we could keep the test with onUncaughtException.
ports
test_exception from Node.js test suite to the CTS.