Registry / testing / urun
library0.0.8jsnpmunverified

urun is a minimal, file-based test runner for Node.js environments. Currently at version 0.0.8, its development appears to be abandoned, with the last significant update to its `package.json` occurring 12 years ago and the last commit 13 years ago. It was designed for simplicity, running `test-*.js` files by default within a specified directory, providing a progress indication, and showing detailed output only for failing tests unless `verbose` mode is enabled. Its key differentiators include its extremely lightweight footprint and direct CommonJS `require` based usage, eschewing complex configuration or modern CLI tools. It offers basic reporter options like 'BashReporter' and 'BashTapReporter' for TAP-compliant output.

npm install urun
INSTALL
IMPORT
SIG · URUN
U
urun
testingjavascriptv0.0.8
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export (function)
const urun = require('urun'); urun(__dirname);
import urun from 'urun';
urun is a CommonJS module and exports a single function. Direct ES module `import` syntax will result in a runtime error.
direct execution
require('urun')(__dirname);
require('urun').run(__dirname);
The package's main export is the function itself, so it's directly invokable after `require`. There are no named exports like `run`.
with options
require('urun')(__dirname, { verbose: true, include: /.+Test\.js$/ });
Configuration is passed as an options object directly to the function call.

Demonstrates how to initialize urun to discover and run `test-*.js` files in the current directory, enabling verbose output for all tests (passing and failing).

const urun = require('urun'); const path = require('path'); // Create a dummy test file require('fs').writeFileSync(path.join(__dirname, 'test-example.js'), ` const assert = require('assert'); module.exports = { 'should pass a basic assertion': function() { assert.strictEqual(1, 1, '1 should equal 1'); }, 'should fail a basic assertion': function() { assert.strictEqual(1, 2, '1 should equal 2'); } }; `); // Run tests in the current directory with verbose output console.log('Running tests with urun...'); process.on('exit', (code) => { if (code === 0) { console.log('All tests passed.'); } else { console.log('Some tests failed. Exit code:', code); } // Clean up dummy test file require('fs').unlinkSync(path.join(__dirname, 'test-example.js')); }); urun(__dirname, { verbose: true });
urun --version
Debug
Known issues
gotchaThe `urun` package has not been updated in over a decade. The latest commit on GitHub is 13 years old, and the `package.json` was last updated 12 years ago. This means it is no longer actively maintained and may have compatibility issues with modern Node.js versions or lack security updates.
fix
Consider using actively maintained test runners like Jest, Mocha, or Vitest for new projects or migrating existing projects from urun.
affects: >=0.0.8
breakingGiven its age, `urun` is strictly a CommonJS module. Attempting to import it using ES module `import` syntax (`import urun from 'urun';`) in a modern Node.js environment configured for ESM will result in a `SyntaxError`.
fix
Always use `const urun = require('urun');` to import this package. If your project is pure ESM, you may need to wrap `urun` in a CommonJS context or consider a different test runner.
affects: >=0.0.1
gotchaThe package is extremely minimal and lacks features common in modern test runners, such as built-in watch mode, parallel test execution, mocking utilities, advanced assertion libraries (it relies on Node's built-in `assert`), or rich reporting beyond basic console and TAP output.
fix
Evaluate your testing needs. For simple, synchronous tests, urun might suffice. For complex applications, features like mocking or component testing, or improved developer experience, a more comprehensive test runner is recommended.
affects: >=0.0.1
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Attempting to use ES module `import` syntax (`import urun from 'urun';`) for the `urun` package in an environment where it's treated as a CommonJS module.
fix
Use CommonJS `require` syntax: `const urun = require('urun');`
TypeError: require(...) is not a function
Attempting to destructure `urun` as a named export, e.g., `const { urun } = require('urun');`, when the package's main export is the function itself (a 'default' CommonJS export).
fix
Import the module as a single function: `const urun = require('urun');`
No tests found matching pattern
The default test file pattern `/test-.+\.js$/` or a custom `include` regex does not match any files in the specified directory, or `__dirname` points to an incorrect location.
fix
Ensure test files follow the `test-*.js` naming convention or adjust the `include` option: `urun(__dirname, { include: /.+Test\.js$/ });` Also, verify `__dirname` or the path passed to `urun` points to the correct directory containing your tests.
Upgrade
Version history
0.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
urun — npm install urun · libregistry