Tests that find your code, not your folders.
π Quick Start
npm install --save-dev adaptive-tests
const { discover } = require('adaptive-tests');
test('finds my service automatically', async () => {
const UserService = await discover({
name: 'UserService',
type: 'class',
methods: ['create', 'update', 'delete']
});
const service = new UserService();
expect(service.create({ name: 'Ada' })).toBeTruthy();
});
π Documentation
Getting Started
- Why Adaptive Tests? - The business case with ROI
- Framework Comparison - vs Jest, Mocha, Pytest, JUnit
- How It Works - Technical deep dive
- Migration Guide - Migrate existing tests
- Best Practices - Patterns and tips
Framework Guides
Reference
- API Reference - Complete API docs
- Error Messages Guide - Detailed error explanations
- CI/CD Strategy - Integration strategies
- Troubleshooting - Problem solving
- Common Issues - Known issues
GitHub Integration
π― Why Adaptive Tests?
Save $200,000+ per year on test maintenance. Tests that break from moving files cost your team 15-20% of their time. Adaptive Tests eliminates this entirely.
The Problem
Traditional tests break when you refactor:
// This breaks when you move Calculator.js
import { Calculator } from '../src/utils/Calculator';
The Solution
Adaptive tests find your code automatically:
// This works no matter where Calculator lives
const Calculator = await discover({ name: 'Calculator' });
β Read the full engineering case
β¨ Features
- π Smart Discovery - Finds classes, functions, and modules by structure
- π Zero Configuration - Works out of the box with Jest
- π Multi-language - Core JS/TS; others beta/experimental
- β‘ Fast - AST-based parsing with intelligent caching
- π οΈ VS Code Extension - Visual discovery tools and scaffolding
- π CI/CD Ready - GitHub Actions integration
π¬ Community
- GitHub Discussions - Ask questions, share ideas
- Issue Tracker - Report bugs, request features
- Examples - See it in action
π Language Support
Language | AST Parser | Status |
---|---|---|
JavaScript | Babel | β Stable |
TypeScript | TypeScript Compiler | β Stable |
Python | Native ast module | π‘ Beta |
Java | JavaParser | π‘ Beta |
PHP | token_get_all / nikic/php-parser | π‘ Beta |
Ruby | Ripper | π§ͺ Experimental |
Go | go/parser (via treeβsitter bindings) | π§ͺ Experimental |
Rust | Lezer (rust) | π§ͺ Experimental |
Wolfram | CodeParse | π§ͺ Experimental |
Status legend: Stable = productionβready; Beta = broadly usable with caveats; Experimental = early support, subject to change.
π€ Contributing
We welcome contributions! See our Contributing Guide.
π License
MIT - See LICENSE for details.