Files
vac-optimizer/src/testing/bun-test.d.ts
T
nessarandClaude Opus 5.5 94d57add2c test: run the suite and benchmark with Bun's native test runner
Replace Vitest with bun test across the whole suite. A preload compiles
components through Angular's JIT transform with inlined templates, sets
up jsdom, TestBed and zoneless change detection, and a small shim covers
the Vitest APIs bun:test lacks. Files run isolated, real-worker specs
spawn the running Bun, and line coverage from lcov is converted to the
existing HTML and Cobertura reports. The CI benchmark replaces its heap
cap with a container memory limit. Vitest, Jest, Nx and their Vite
configuration are removed.

Refs #291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:40:42 +02:00

19 lines
652 B
TypeScript

/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars */
import 'bun:test';
// Vitest APIs that the compat shim adds to bun:test.
declare module 'bun:test' {
interface Expect {
// Vitest-style loose matcher arguments: Bun's strict ones reject readonly and widened values.
(actual?: unknown): Matchers<any>;
poll<T>(
fn: () => T | Promise<T>,
options?: { timeout?: number; interval?: number },
): Matchers<Awaited<T>> & { not: Matchers<Awaited<T>> } & Record<string, unknown>;
}
interface Matchers<T> {
toHaveBeenCalledOnce(): void;
toHaveBeenCalledExactlyOnceWith(...args: unknown[]): void;
}
}