sindresorhus/eslint-node-test — explained in plain English
Analysis updated 2026-05-18
Catch common mistakes in tests written with Node.js's built-in node:test runner.
Enforce a consistent order for test setup and teardown hooks across a project.
Automatically fix simple test style issues using ESLint's fix option.
Prevent tests from mixing callback style and Promise style in the same test.
| sindresorhus/eslint-node-test | ektogamat/r3f-webgpu-perf | freecodecamp/news-translation-tasks | |
|---|---|---|---|
| Stars | 60 | 60 | 60 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | — | — | 2026-03-16 |
| Maintenance | — | — | Maintained |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires ESLint 10.4 or newer with flat config and an ESM project.
eslint-node-test is a plugin for ESLint, the popular JavaScript code checking tool, that focuses specifically on tests written with node:test, the test runner built directly into Node.js. Its job is to catch common mistakes in how tests are written and to nudge every test file in a project toward a more consistent style, the same way ESLint already does for regular application code. Setting it up means installing it alongside ESLint and adding it to a project's ESLint configuration file, either by turning on one of the ready made presets or by picking specific rules to enable one at a time. It requires a fairly recent version of ESLint that uses the newer flat config format, along with a project set up to use ES modules rather than the older CommonJS style. The rules are written so they only turn on inside files that actually import from node:test or Node's built in assert module, so the plugin can safely be applied across an entire codebase without interfering with unrelated files. The plugin ships a large collection of individual rules, each targeting a specific pattern such as enforcing a consistent order for setup and teardown hooks, disallowing assertions written directly inside a describe block instead of inside an actual test, requiring async test functions to actually use await, and preventing tests from mixing callback and Promise based styles at the same time. Several of these rules can automatically fix the code for you when ESLint is run with its fix option, while others offer suggested fixes that a developer can apply manually inside their editor.
An ESLint plugin with rules that catch mistakes and enforce consistency in tests written for Node.js's built-in test runner.
Mainly JavaScript. The stack also includes JavaScript, ESLint, node:test.
No license information was found in the README.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.