testmesh
v0.1.0
Published
TestMesh is a modern TypeScript testing library with support for dependency graphs, visualization, and parallel execution.
Maintainers
Readme
TestMesh
TestMesh is a modern TypeScript testing library with support for dependency graphs, visualization, and parallel execution.
Features
- Dependency Graph - Tests can depend on each other
- Visualization - Real-time web interface for monitoring execution
- Parallel Execution - Automatic optimization of execution order
- Convenient DSL - Intuitive API for creating tests
- TypeScript - Full type safety out of the box
- CLI - Convenient command-line interface
Quick Start
Installation
# Using npm
npm install testmesh
# Using yarn
yarn add testmesh
# Using pnpm
pnpm add testmesh
# Using bun
bun add testmeshCreating Tests
import { TestMesh, mesh, expect } from "testmesh";
const suite = mesh()
.suite("My tests")
.test("basic test")
.run(async () => {
expect(2 + 2).toBe(4);
})
.test("test with dependency")
.dependsOn("basic test")
.run(async () => {
expect("hello").toBe("hello");
})
.build();
const testMesh = new TestMesh({
parallel: true,
visualization: { autoOpen: true },
});
testMesh.addSuite(suite);
await testMesh.run();Running via CLI
# Create a template
npx testmesh init
# Run tests
npx testmesh run -f tests.ts
# Run only the visualizer
npx testmesh visualize