port test_reference to CTS#47
Conversation
|
@legendecas Can we run the tests again? |
ports [test_reference](https://github.com/nodejs/node/tree/main/test/js-native-api/test_reference) from the Node.js test suite to the CTS. Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
e6591cc to
0d6c4b7
Compare
| "--import", | ||
| "file://" + MUST_CALL_MODULE_PATH, | ||
| // test_finalizer needs this | ||
| "--force-node-api-uncaught-exceptions-policy", |
There was a problem hiding this comment.
Would we need a way to run tests with and without this enabled? 🤔
There was a problem hiding this comment.
This flag has been enabled by default, and it is a legacy Node.js bug. I don't think it is necessary to keep track of this flag.
There was a problem hiding this comment.
removed the flag
Verification: Test code compared against upstream Node.jsI compared the test files in this PR against the upstream Node.js source at C Files: Identical
JS Files: Only Expected Harness AdaptationsBoth test.js and test_finalizer.js differ only in mechanical ways:
No test logic was added, removed, or altered. The port is faithful to upstream. |
| const onUncaughtException = (cb) => { | ||
| process.on("uncaughtException", cb); | ||
| }; |
There was a problem hiding this comment.
Again - unsure how we'd be implementing this in other implementors 🤔 But perhaps we'll just have to cross that bridge when we get there.
| @@ -0,0 +1,23 @@ | |||
| "use strict"; | |||
| // Flags: --expose-gc --force-node-api-uncaught-exceptions-policy | |||
There was a problem hiding this comment.
I'm starting to wonder if we should add some file to the node implementor harness to track which test files needs what flags enabled when spawning the test's sub-process 🤔
kraenhansen
left a comment
There was a problem hiding this comment.
We should add a harness test for onUncaughtException.
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
| @@ -0,0 +1,168 @@ | |||
| "use strict"; | |||
| // Flags: --expose-gc | |||
There was a problem hiding this comment.
Does it need any action item?
This flag is needed from my testing.
Do we need to document anything?
Oh! it is about #47 (comment)
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
ports
test_reference from the Node.js test suite to the CTS.