node-test is a simple, asynchronous test runner for Node.js, currently at version 1.4.6. Its core design principles emphasize concurrent test execution, the absence of global testing primitives like `describe` or `it`, and the ability to run test files directly via `node` without a dedicated CLI. It supports asynchronous tests through Promises or Node.js-style callbacks and extends the core `assert` module with additional assertions. The library prioritizes direct code execution and debuggability by not forking test processes by default, aiming to make testing feel like writing any other application code. Release cadence is infrequent, with the last major update several years ago, indicating a mature but less actively developed project. It differentiates itself by its minimalist, no-globals approach.
npm install node-testVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating a test suite, defining asynchronous tests with Promises and callbacks, synchronous assertions, and using skip/todo features.
Migrate existing tests from global `describe`/`it` syntax to `new Suite('Name')` and `suite.test('Name', ...)`.Ensure async test functions return a Promise or accept `done` as a second argument and call `done()` when the asynchronous operation completes.
Design tests to be independent and atomic. Use `beforeEach` and `afterEach` hooks for setup/teardown if state management is unavoidable, or explicitly configure serial test execution for a suite when order matters.
Use `const Suite = require('node-test');` for importing the library. If using ESM in your project, ensure proper CommonJS interoperability settings are configured or consider using a different test runner with native ESM support.Refactor tests to use `new Suite('Name')` and `suite.test('Test Name', ...)` as `node-test` does not provide global test primitives.Review the test logic and the expected output. Adjust the assertion or the code under test to ensure correctness.
Ensure all asynchronous operations within a test either return a Promise or call the `done()` callback upon completion. Check for unhandled promises or forgotten `done()` calls.
No dependency data recorded yet.