Registry / testing / base-test-runner

base-test-runner

JSON →
library0.2.0jsnpmunverified

A test runner for base projects, version 0.2.0, last updated in 2016. It is a minimal wrapper that uses yargs-parser to parse command-line arguments and emits 'file' events for each test file, allowing users to require the file with a custom base application. It is part of the base ecosystem and has no active development or maintenance cadence. Differentiators: simple event-based interface, integrates with base applications.

npm install base-test-runner
INSTALL
IMPORT
SIG · BASE-TEST-RUNNER
B
base-test-runner
testingjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

runner
const runner = require('base-test-runner')(argv);
import runner from 'base-test-runner';
Package is CJS-only, no ESM export. Use require().
events
runner.on('file', (file) => { ... });
runner.on('data', (file) => { ... });
Only emits 'file' event, not 'data'.
file.path
require(file.path)(require('base'));
require(file)(require('base'));
file object has a .path property containing the file path.

Create a test runner from CLI args and run each test file with a base application.

const argv = require('yargs-parser')(process.argv.slice(2)); const runner = require('base-test-runner')(argv); runner.on('file', function(file) { require(file.path)(require('base')); });
Debug
Known issues
deprecatedPackage is no longer maintained
fix
Consider using a modern test runner like Mocha or Jest.
affects: >=0.0.0
gotchaPackage has no tests
fix
Test before using in production.
affects: 0.2.0
gotchaRequires 'yargs-parser' as peer dependency
fix
Install yargs-parser explicitly.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'base-test-runner'
Package not installed or no ESM export
fix
npm install base-test-runner --save; use require() not import.
TypeError: runner.on is not a function
Called runner() without argv argument
fix
Call require('base-test-runner')(argv) with argv object.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
yargs-parserrequiredused to parse command-line arguments
Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
1
Resources
base-test-runner — npm install base-test-runner · libregistry