Skip to content

feat: port test_error to CTS#40

Open
bavulapati wants to merge 1 commit intonodejs:mainfrom
bavulapati:feat/port-test-error
Open

feat: port test_error to CTS#40
bavulapati wants to merge 1 commit intonodejs:mainfrom
bavulapati:feat/port-test-error

Conversation

@bavulapati
Copy link
Copy Markdown

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

2 participants