Tests that don't break when you move files.
Traditional tests use hardcoded file paths. When you refactor, they break. Adaptive Tests find your code by its structure, not its location, so your tests are resilient to change.
The Problem:
// You moved Calculator.js from /utils to /math
import { Calculator } from '../utils/Calculator';
// ❌ Error: Cannot find module '../utils/Calculator'The Solution:
const Calculator = await discover({ name: 'Calculator' });
// ✅ Found it in /math - tests pass- Stop wasting time fixing broken imports. Let your tests adapt to your code, not the other way around.
- Perfect for AI-powered development. Let AI agents refactor your code without breaking your test suite.
- Refactor with confidence. Clean up your codebase without the fear of a thousand failing tests.
- Works with your existing tools. Integrates with Jest, Vitest, Pytest, JUnit, and more.
→ Read the full story: Why Adaptive Tests?
| Language | Status | Package | Guide |
|---|---|---|---|
| JavaScript | ✅ Stable | @adaptive-tests/javascript |
Guide |
| TypeScript | ✅ Stable | @adaptive-tests/typescript |
Guide |
| Python | ✅ Stable | adaptive-tests-py |
Guide |
| Java | ✅ Stable | io.adaptivetests |
Guide |
ℹ️ The TypeScript package wraps the JavaScript discovery engine. Installing
@adaptive-tests/typescriptpulls in the JavaScript core automatically.
Get started in minutes with our interactive setup wizard.
# For JavaScript/TypeScript
npm install @adaptive-tests/javascript --save-dev
npx adaptive-tests init
# (Optional) Diagnose discovery
npx adaptive-tests why '{"name":"Calculator","type":"class"}'
# For Python
pip install adaptive-tests-py
adaptive-tests initStuck? Try these quick fixes:
- Ensure your file types are included (e.g., add
.ts/.tsxin discovery.extensions) - Try a simpler signature:
{ "name": "YourClass" } - Run
npx adaptive-tests why '…'and adjust based on the result
Works with Cursor / Copilot / VS Code — no extension required.
→ See the full Quick Start Guide
- AST-based discovery: Finds code by its structure, not its location.
- "Invisible Mode": Automatically fixes broken imports in your existing tests with zero code changes.
- Powerful CLI: Scaffold tests, debug discovery, and migrate your entire test suite.
- Framework-agnostic: Works with your favorite testing framework.
- GitHub Action: Run your adaptive tests in CI.
We welcome contributions! Please see our Contributing Guide for more details.