{"id":24872,"library":"a_test","title":"a_test","description":"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.","status":"active","version":"1.0.9","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/alfateam/a_test","tags":["javascript","tdd","bdd","test runner"],"install":[{"cmd":"npm install a_test","lang":"bash","label":"npm"},{"cmd":"yarn add a_test","lang":"bash","label":"yarn"},{"cmd":"pnpm add a_test","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package, no CommonJS export.","wrong":"const describe = require('a_test')","symbol":"describe","correct":"import { describe } from 'a_test'"},{"note":"Symbol is 'it', not 'test'.","wrong":"import { test } from 'a_test'","symbol":"it","correct":"import { it } from 'a_test'"},{"note":"when is the primary assertion style.","wrong":null,"symbol":"when","correct":"import { when } from 'a_test'"}],"quickstart":{"code":"import { describe, it, when } from 'a_test';\n\ndescribe('Math', () => {\n  it('adds numbers', () => {\n    when(1 + 1).then(2);\n  });\n});\n\ntest.run();","lang":"typescript","description":"Minimal test suite using when-style assertions and recursive test runner."},"warnings":[{"fix":"Replace expect() calls with when().then() pattern.","message":"v1.0.0 switched from 'expect' to 'when' assertion syntax; existing tests using 'expect' will fail.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Use describe.skip(() => {}) or it.skip(() => {}).","message":"describe.skip and it.skip are deprecated; use .skip property on the test callback instead.","severity":"deprecated","affected_versions":">=1.0.5"},{"fix":"Set rootDir option in test.run({ rootDir: './tests' }) to limit scope.","message":"Recursive test runner may cause infinite loops if tests are in parent directories without proper configuration.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install a_test' in your project.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'a_test'"},{"fix":"Change to 'import { describe } from 'a_test'' and ensure package.json has 'type': 'module'.","cause":"Using CommonJS require instead of ESM import.","error":"TypeError: (0 , a_test.describe) is not a function"},{"fix":"Add 'test.run();' after defining tests.","cause":"Forgetting to call test.run() at the end of the test file.","error":"ReferenceError: test is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}