Skip to content

feat: port test_error to CTS#40

Merged
legendecas merged 3 commits intonodejs:mainfrom
bavulapati:feat/port-test-error
Apr 9, 2026
Merged

feat: port test_error to CTS#40
legendecas merged 3 commits intonodejs:mainfrom
bavulapati:feat/port-test-error

Conversation

@bavulapati
Copy link
Copy Markdown
Contributor

@kraenhansen
Copy link
Copy Markdown
Contributor

kraenhansen commented Mar 30, 2026

Reviewed: C file is a verbatim copy of upstream, CMakeLists.txt correct (no experimental needed — NAPI_VERSION 9 is a stable version pin for node_api_throw_syntax_error/node_api_create_syntax_error), all upstream test cases preserved.

One thing to flag: the test uses assert.throws with an object matcher ({ code, message }) and a validation-function form. These work here because the Node.js implementor delegates directly to node:assert/strict. The object-matcher form is already used in test_bigint too, but the harness test in tests/harness/assert.js doesn't cover either form — tracked in #42.

"use strict" tracked in #41.

Reported on nodejs#42

Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
@legendecas legendecas merged commit 48f1a69 into nodejs:main Apr 9, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from Need Triage to Done in Node-API Team Project Apr 9, 2026
bavulapati added a commit to bavulapati/node-api-cts that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants