test-executor is a Node.js library, currently at version 1.2.4, designed for executing test scripts and directories of test scripts within a CommonJS (CJS) environment. It was last published to npm approximately 7 years ago, indicating that while it has a semantic version, active development has largely ceased. The library's core mechanism is based on the Async Tree Pattern, which it leverages to manage test execution flow. Its primary dependency is `cutie`. This package offers a straightforward API for running tests by specifying file or directory paths, providing console output for results. Due to its age, it primarily targets older Node.js environments and does not natively support ECMAScript Modules (ESM) syntax or modern testing paradigms.
npm install test-executorVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize and run tests from specified files or directories using the CommonJS `require` syntax.
Ensure your project is configured for CommonJS, or use dynamic `import()` if absolutely necessary within an ESM context, though this is not officially supported and may lead to unexpected behavior. For new projects, consider modern test runners with native ESM support.
For new projects, evaluate modern, actively maintained test runners. For existing projects, be aware of potential runtime issues with newer Node.js versions or security vulnerabilities that will not be patched.
Double-check that all paths passed to `new ExecutedTests(...)` accurately point to existing test files or directories that contain test files expected by the executor.
This package is CommonJS-only. If your project is ESM, you cannot directly `import` or `require` this package. Consider migrating to a modern test runner or refactoring your project to use CJS if `test-executor` is critical.
Ensure you are using `const { ExecutedTests } = require('test-executor')` and instantiating with `new ExecutedTests(...)`. The default export is not `ExecutedTests` itself.Run `npm install test-executor` or `yarn add test-executor` to install the package. Verify that `node_modules` is present and accessible.