Building the Node-API Conformance Test Suite

This ad is not shown to multipass and full ticket holders
React Summit
React Summit 2026
June 11 - 15, 2026
Amsterdam & Online
The biggest React conference worldwide
Upcoming event
React Summit 2026
React Summit 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

I've been contributing a Conformance Test Suite to the Node.js project: For Node-API implementors to run across different JavaScript engines and runtimes, such as Bun, Deno and React Native.
I want to share motivation for the project, architectural decisions, the progress we've made so far and key techniques used to ensure the implementation stays runtime agnostic.

This talk has been presented at Node Congress 2026, check out the latest edition of this JavaScript Conference.

FAQ

The Node API conformance test suite is a project designed to test Node API implementations across various runtimes like Node.js, Bunn, Deno, and React Native. It ensures compatibility and standardization across different environments.

There is a need for the test suite because Node API is becoming a cross-runtime standard, but current tests are tied to Node.js. The suite provides a shared ground truth for different runtimes to validate their Node API implementations.

The key design goals are: no Node.js runtime APIs in tests, customizable harness for implementers, gradual opt-in for new runtimes, isolation of test files, and easy accessibility via npm.

The suite maintains runtime agnosticism by avoiding Node.js-specific require calls, using self-contained test files, and injecting necessary globals ahead of time.

As of now, the infrastructure is in place with a CI matrix, 14 tests fully ported, and the suite published under the Node.js organization on GitHub. The focus is now on porting medium and hard tests and engaging other runtimes like Bunn, Deno, and React Native.

Contributions can be made by porting medium and hard tests, adding runtime support to the harness, or simply starring or watching the GitHub repository to stay updated.

Challenges include porting tests that require Node.js runtime APIs, handling experimental functions, and ensuring compatibility across different runtimes.

Publishing on npm allows easy access and integration of the test suite for developers, enabling them to run tests without needing to check out the repository directly.

Future phases include porting medium and hard tests, integrating the suite with Bunn, Deno, and React Native, and potentially integrating the test suite with the Node.js main repository.

Kane is a developer experience engineer at 11labs, where he builds developer experiences for people working with voice agents and other services.

Kræn Hansen
Kræn Hansen
18 min
26 Mar, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Kane introduces a Node.js project for a conformance test suite aiming to address compatibility issues across different runtimes like Deno and React Native. The suite ensures standardized tests for Node API, abstracting V8 for Node.js internals. It focuses on cross-runtime standardization, test porting progress, and calls for contributors to address challenges in Node API testing.

1. Introduction to Node API Conformance Test Suite

Short description:

Kane introduces a Node.js project for a conformance test suite for Node API. The project aims to address compatibility issues across different runtimes like Deno and React Native via Hermes. Node API provides a stable C API to access JavaScript, allowing compatibility across various Node.js versions and runtimes. It abstracts V8 for Node.js internals, becoming a de facto standard in the industry.

Hi, my name is Kane, and today I want to share a project that I've been building in the Node.js organization, a conformance test suite for Node API. But first, a few words about me. My name is Kane, as I said, and I am a developer experience engineer at 11labs. I built developer experiences for people building on top of the voice agents and the other services that we have. And before that, I maintained the Atlas Devices SDK, formerly known as Realm.js at MongoDB. I'm a proud father of three, based in Roskill, just west of Copenhagen. I also like to build in public, and I do a lot of open source. Callstack sponsors me for this in particular, and I have GitHub sponsorships open if you want to join them. You can find me on BlueSky as well.

And let's start with something that you might be familiar with. You've written a native Node.js add-on, perhaps. It works perfectly fine in Node.js, and your CI is green, and you ship it. But does it work on Deno? Does it work on React Native, which recently also supported Node API via Hermes? The honest answer is you probably don't know, and that is the problem that I set out to fix.

Let me back up and explain how we got here. Let me start with getting on the same page of Node, what Node API is, and starting with what it is not, because it's often confused. It is not the Node.js runtime APIs, things like File System, Path, Process. It is a C API to access JavaScript. It is API stable. That means that you can compile it once, and your add-on once, and then you can reuse it across new versions of Node.js. The headers for the C API, it ships on npm. So, one package, that's all you need. And it contains these library files in two layers. One is the engine-specific part, and this is the js-native-api.h, creating values, calling functions, managing memory, for example, and then the runtime-specific part, which is more specific to Node.js. Runtime APIs, like buffers, async work, lifecycle events. Originally, Node API was designed to abstract V8 for Node.js internals, and basically, you could write your implementation once, and then you wouldn't have to link directly against the V8-specific version. For other runtimes now, they started adopting this. BAN and DINO, not necessarily in that order. And then later, React Native by Hermes, and this other implementers as well. This is the remarkable thing. You have one C header designed for one runtime that is now becoming a de facto standard in the industry.

2. Challenges in Node API Conformance Testing

Short description:

The Node API conformance test suite addresses the need for standardized tests across different runtimes. Existing Node.js tests are tied to Node.js runtime specifics, hindering compatibility with other runtimes. The conformance test suite ensures tests run on various runtimes, providing a shared ground truth for Node API support.

And as I said, it's split into these two categories of APIs. I already touched upon this. And I mean, the left-hand side, these are the engine-agnostic APIs. They are supposed to work across all JS engines. And then the other, more runtime-specific APIs, specific to Node.js, might or might not have support within the other implementers. This also turns out to be a concept for the compliance test suite. And now that we know what Node API is and who is implementing it, I want to tell you what's missing.

So the Node.js repo already has tests for this. They have like 58 test folders with testing each of the different feature areas. But when you open up these tests, you see things like a require call, which is a Node.js-specific, the common JS pattern, for module import. And you also see stuff like loading the add-on using a require call, which is not a part of the official, you can say, Node API specification. And these tests are completely tied to Node.js runtime. The utility, the comment file that you see here, has internal implementation that use FS and the paths and stuff like that. So we want to make sure to run these on other runtimes.

You can see some of the existing prior art here. You can see some of the projects basically copied out the Node.js tests. And the consequences here that when a bug is fixed in the Node.js repository, it doesn't automatically propagate or if a new test is added, for example, it's not automatically propagating and exercising the Bonandino implementation. And this is an issue because the spec clarification, you can see that the tests are implementing, they stay siloed. And when one runtime claims that they support Node API, there's no shared guarantee to like something that you can use to validate that claim. And this is a gap. And that is what the Node API conformance test suite fills.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

How Bun Makes Building React Apps Simpler & Faster
React Day Berlin 2022React Day Berlin 2022
9 min
How Bun Makes Building React Apps Simpler & Faster
Top Content
BUN is a modern all-in-one JavaScript runtime environment that achieves new levels of performance. It includes BUN dev, a fast front-end dev server, BUN install, a speedy package manager, and BUN run, a fast package runner. BUN supports JSX, has optimized React server-side rendering, and offers hot module reloading on the server. The priorities for BUN include stability, node compatibility, documentation improvement, missing features in BUN install, AST plugin API, native Windows support, Bundler and Minifier optimization, and easier deployment to production. BUN's AST plugin API allows for bundle-time JavaScript execution and embedding code, potentially inspiring new frameworks.
Never Worry About CORS Again
JSNation US 2025JSNation US 2025
28 min
Never Worry About CORS Again
Talk on Bund: Overview of Bund, its speed optimization, components like runtime, package manager, test runner, and bundler. Efficient features include fast npm manager, pnpm lockfile support, Jest-compatible test runner, and optimized runtime components. Built-in features like modern password hashing, WebSocket server, file glob API, and database clients. API design focuses on common use cases and optimization. Enhanced JavaScript functionality with SIMD, native code, and performance improvements. Challenges in JavaScript productivity, BUN adoption, deployment, and support. React support, community involvement, security, Next.js compatibility, and transition.
Node.js Compatibility in Deno
Node Congress 2022Node Congress 2022
34 min
Node.js Compatibility in Deno
Deno aims to provide Node.js compatibility to make migration smoother and easier. While Deno can run apps and libraries offered for Node.js, not all are supported yet. There are trade-offs to consider, such as incompatible APIs and a less ideal developer experience. Deno is working on improving compatibility and the transition process. Efforts include porting Node.js modules, exploring a superset approach, and transparent package installation from npm.
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Node Congress 2023Node Congress 2023
29 min
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Top Content
The Talk explores the magic behind Node.js and delves into its components, including V8, libuv, and the C++ bridge. It discusses the workflow and execution process, the use of NodeMod, and the understanding of console functions. The Talk also covers Node.js functions and scheduling, the introduction of runtimes, and the collaboration between JavaScript runtimes. It concludes with insights on content production, the choice of Node.js, and the inspiration behind it.
Eval all the strings! - Hardened JavaScript
Node Congress 2023Node Congress 2023
8 min
Eval all the strings! - Hardened JavaScript
NPM packages can be potentially dangerous, so it's important to be proactive in managing them. Lava Mode allows you to detect and investigate suspicious packages before deploying your app. Lavamote prevents unauthorized access to sensitive resources by isolating dependencies and using hardened JavaScript. Lava Mode makes it easier to analyze obfuscated files and understand their actions.
Roll you own JavaScript runtime
Node Congress 2023Node Congress 2023
21 min
Roll you own JavaScript runtime
This Talk introduces Deno, a custom JavaScript runtime similar to Node.js, and discusses the benefits of using a custom runtime. It explores the process of building a custom runtime with Deno in Rust, including the integration with Cargo and the ability to mix and match crates and APIs. The Talk also covers the implementation of the setTimeout function in both Run.js and Runtime.js, and provides examples of how to fix errors and implement additional functions. Overall, the Talk highlights the flexibility and possibilities of creating custom runtimes with Deno.

Workshops on related topic

Build Peer-to-Peer Applications with Pear Runtime
JSNation 2024JSNation 2024
152 min
Build Peer-to-Peer Applications with Pear Runtime
Top Content
WorkshopFree
David Mark Clements
David Mark Clements
Learn how to rapidly build peer-to-peer applications with Pear Runtime. No servers required. Understand peer-to-peer paradigms and construct applications from well-defined building blocks. This workshop will cover how to create both Desktop and Terminal applications (with discussion for Mobile) that work entirely peer-to-peer from anywhere in the world. By the end of this workshop you should know how to build a new type of highly scalable application with entirely reduced infrastructural costs (~0) along with suitable architectures and best practices for peer-to-peer applications. From the creator of Pear Runtime and the company that brings us keet.io. Table of content:- Introducing Pear- Initial Q & A- Getting Setup- Creating a Pear Desktop Application- Sharing a Pear Application- Running a Pear Application- Creating a Pear Terminal Application- Releasing a Pear Application- Architectural Discussions- Wrap-up Q & A