Registry / testing / a_test

a_test

JSON →
library1.0.9jsnpmunverified

Compact test framework using when-style assertions with recursive test runner. Current stable version 1.0.9. Sub-package of the 'a' monorepo, focusing on minimalist TDD/BDD syntax. Differentiators: lightweight, recursive test discovery, when-style chaining for readable tests. Cadence: part of 'a' ecosystem, releases tied to main package.

npm install a_test
INSTALL
IMPORT
SIG · A_TEST
A
a_test
testingjavascriptv1.0.9
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.

describe
import { describe } from 'a_test'
const describe = require('a_test')
ESM-only package, no CommonJS export.
it
import { it } from 'a_test'
import { test } from 'a_test'
Symbol is 'it', not 'test'.
when
import { when } from 'a_test'
when is the primary assertion style.

Minimal test suite using when-style assertions and recursive test runner.

import { describe, it, when } from 'a_test'; describe('Math', () => { it('adds numbers', () => { when(1 + 1).then(2); }); }); test.run();
Debug
Known issues
breakingv1.0.0 switched from 'expect' to 'when' assertion syntax; existing tests using 'expect' will fail.
fix
Replace expect() calls with when().then() pattern.
affects: <1.0.0
deprecateddescribe.skip and it.skip are deprecated; use .skip property on the test callback instead.
fix
Use describe.skip(() => {}) or it.skip(() => {}).
affects: >=1.0.5
gotchaRecursive test runner may cause infinite loops if tests are in parent directories without proper configuration.
fix
Set rootDir option in test.run({ rootDir: './tests' }) to limit scope.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'a_test'
Package not installed or not in node_modules.
fix
Run 'npm install a_test' in your project.
TypeError: (0 , a_test.describe) is not a function
Using CommonJS require instead of ESM import.
fix
Change to 'import { describe } from 'a_test'' and ensure package.json has 'type': 'module'.
ReferenceError: test is not defined
Forgetting to call test.run() at the end of the test file.
fix
Add 'test.run();' after defining tests.
Upgrade
Version history
1.0.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
59 hits · last 30 days
node
54
OpenAI (training)
1
Resources
a_test — npm install a_test · libregistry