@twai/core
v0.0.7
Published
Core types and utilities for TWAI (Test With AI) testing framework
Downloads
29
Readme
@twai/core
Core types, configuration, and test runner for the TWAI (Test With AI) testing framework.
Installation
pnpm add @twai/coreUsage
import { defineConfig, TestRunner, type TestCase } from "@twai/core";
// Define configuration
const config = defineConfig({
name: "my-tests",
baseUrl: "http://localhost:3000",
timeout: 30000,
});
// Create and run tests
const runner = new TestRunner();
runner.addTest({
id: "test-1",
name: "Example test",
steps: [
{ id: "step-1", action: "navigate", target: "/" },
{ id: "step-2", action: "click", target: "#button" },
],
});
const results = await runner.runAll();Exports
defineConfig- Configuration helperloadConfig- Load config from fileTestRunner- Test execution engine- Types:
TestCase,TestStep,TestResult,ToolDefinition, etc.
