TWDTest While Developing
because testing isn’t a phase, it’s part of the flow.
🧪
In-Browser Test Runner
Beautiful sidebar UI that runs tests directly in your browser with instant feedback as you develop.
⚡
Instant Feedback
See test results immediately as you write code. No need to switch between terminal and browser.
🔥
Mock Service Worker Integration
Powerful API mocking with Mock Service Worker integration for realistic request/response testing.
📝
Simple, Readable Syntax
Familiar testing syntax inspired by popular frameworks like Cypress and Jest with TypeScript support.
🧩
Automatic Test Discovery
Works seamlessly with Vite to automatically discover and load your test files.
🛠️
React Ready
Built specifically for React applications with plans t…
TWDTest While Developing
because testing isn’t a phase, it’s part of the flow.
🧪
In-Browser Test Runner
Beautiful sidebar UI that runs tests directly in your browser with instant feedback as you develop.
⚡
Instant Feedback
See test results immediately as you write code. No need to switch between terminal and browser.
🔥
Mock Service Worker Integration
Powerful API mocking with Mock Service Worker integration for realistic request/response testing.
📝
Simple, Readable Syntax
Familiar testing syntax inspired by popular frameworks like Cypress and Jest with TypeScript support.
🧩
Automatic Test Discovery
Works seamlessly with Vite to automatically discover and load your test files.
🛠️
React Ready
Built specifically for React applications with plans to support more frameworks soon.
Quick Example
VIDEO HERE - Overview of TWD in action - showing the sidebar, running tests, and seeing results in real-time
ts
import { describe, it, twd, userEvent } from "twd-js";
describe("User login", () => {
it("should login successfully", async () => {
twd.visit("/login");
const user = userEvent.setup();
const emailInput = await twd.get("input#email");
const passwordInput = await twd.get("input#password");
const loginButton = await twd.get("button[type='submit']");
await user.type(emailInput.el, "user@example.com");
await user.type(passwordInput.el, "password123");
await user.click(loginButton.el);
const welcome = await twd.get("h1");
welcome.should("contain.text", "Welcome");
});
});
Why TWD?
TWD bridges the gap between development and testing by bringing tests directly into your development environment. Instead of running tests in a separate terminal, you can see results instantly in your browser’s sidebar while you code.
Perfect for:
-
Frontend developers who want immediate test feedback
-
Teams practicing Testing while Developing (TWD)
-
React applications that need comprehensive UI testing
-
Projects requiring API mocking and integration testing