# What Testing Frameworks Does OmniRoute Use? A Complete Technical Guide

> Discover the OmniRoute testing framework stack. Learn how Vitest, Playwright, and Node.js native test runner ensure robust software quality.

- Repository: [Diego Rodrigues de Sa e Souza/OmniRoute](https://github.com/diegosouzapw/OmniRoute)
- Tags: how-to-guide
- Published: 2026-07-11

---

**TLDR:** OmniRoute employs a layered testing stack comprising **Vitest** for unit and UI component tests, **Playwright** for browser-based end-to-end testing, and **Node.js native test runner** (`node:test`) for lightweight unit tests without external dependencies.

The OmniRoute repository maintains high code quality through a comprehensive testing strategy that spans multiple layers of the application stack. Understanding what testing frameworks OmniRoute uses is essential for developers contributing to the codebase, as each tool serves distinct purposes from rapid unit validation to full browser automation.

## Vitest: The Primary Unit and UI Testing Framework

Vitest serves as the main test runner for OmniRoute, leveraging its Vite-powered architecture for fast execution of both unit tests and UI component validations.

In [`package.json`](https://github.com/diegosouzapw/OmniRoute/blob/main/package.json), **Vitest v4.1.7** is declared as a devDependency and invoked through several npm scripts:

- `npm run test:vitest` – Executes the main Vitest suite using [`vitest.mcp.config.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/vitest.mcp.config.ts)
- `npm run test:vitest:ui` – Runs UI-focused Vitest test suites

The configuration files [`vitest.mcp.config.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/vitest.mcp.config.ts) and [`vitest.config.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/vitest.config.ts) define the testing environment, while unit tests reside in `tests/unit/**/*.test.ts` files.

Example of a standard Vitest unit test found in the repository:

```typescript
import { describe, it, expect } from "vitest";

describe("example utility", () => {
  it("adds numbers correctly", () => {
    expect(1 + 1).toBe(2);
  });
});

```

## Playwright: End-to-End Browser Testing

For integration and end-to-end testing, OmniRoute uses **Playwright** (`@playwright/test`) to automate browser interactions and verify complete user workflows.

The Playwright tests are located in `tests/e2e/**/*.spec.ts`, with [`tests/e2e/smoke.spec.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/e2e/smoke.spec.ts) serving as a key example. These tests cover navigation flows, visual regression, and critical feature validations across different browsers.

Execute Playwright tests via:

```bash
npm run test:e2e

```

A typical Playwright test from the repository checks page rendering:

```typescript
import { test, expect } from "@playwright/test";

test("home page loads", async ({ page }) => {
  await page.goto("/");
  await expect(page.getByRole("heading", { name: "OmniRoute" })).toBeVisible();
});

```

## Node.js Native Test Runner: Lightweight Unit Testing

OmniRoute also utilizes **Node.js native test runner** (`node:test`) for specific low-level unit tests that avoid external framework dependencies. This approach is implemented in files like [`tests/unit/quota-share-strategy.test.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/unit/quota-share-strategy.test.ts), providing a minimal overhead option for isolated logic testing without importing Vitest.

## Test Execution Scripts and Configuration

The [`package.json`](https://github.com/diegosouzapw/OmniRoute/blob/main/package.json) file defines a comprehensive set of npm scripts that orchestrate the testing frameworks:

- `test:vitest` – Runs Vitest with the MCP configuration
- `test:vitest:ui` – Executes UI-specific Vitest suites
- `test:e2e` – Launches Playwright end-to-end suites
- `test:all` – Comprehensive command running unit tests, Vitest suites, Playwright suites, ecosystem tests, and additional integration tests

Run the complete validation suite with:

```bash
npm run test:all

```

## Summary

- OmniRoute uses **Vitest** as the primary test runner for unit and UI component tests, configured via [`vitest.mcp.config.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/vitest.mcp.config.ts)
- **Playwright** handles end-to-end browser testing in `tests/e2e/**/*.spec.ts` files such as [`tests/e2e/smoke.spec.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/e2e/smoke.spec.ts)
- **Node.js native test runner** (`node:test`) provides lightweight testing for specific unit tests like [`tests/unit/quota-share-strategy.test.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/unit/quota-share-strategy.test.ts)
- Execute specific test suites via `npm run test:vitest`, `npm run test:e2e`, or run everything with `npm run test:all`

## Frequently Asked Questions

### Does OmniRoute use Jest for testing?

No, OmniRoute uses **Vitest** instead of Jest. The repository specifically includes Vitest v4.1.7 as a devDependency in [`package.json`](https://github.com/diegosouzapw/OmniRoute/blob/main/package.json), leveraging its native Vite integration for faster test execution compared to traditional Jest configurations.

### How do I run only the UI tests in OmniRoute?

Use the dedicated npm script `npm run test:vitest:ui` to execute only the UI-focused Vitest suites. This command targets specific test files configured for user interface validation without running the full unit test suite or Playwright tests.

### What is the purpose of using Node.js native test runner alongside Vitest?

The Node.js native test runner (`node:test`) is reserved for low-level unit tests that require minimal dependencies, such as [`tests/unit/quota-share-strategy.test.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/unit/quota-share-strategy.test.ts). This approach reduces overhead for simple logic tests while Vitest handles more complex component and integration scenarios that require its advanced features.

### Where are the Playwright end-to-end tests located in the repository?

Playwright tests are located in the `tests/e2e/` directory, with files following the `*.spec.ts` pattern. The [`tests/e2e/smoke.spec.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/tests/e2e/smoke.spec.ts) file contains example tests covering critical browser flows and navigation validation.