☰
VSuite

@vsuite/test-utils

Dev-only helpers for workspace tests. It is a private, source-only package (exports → ./src/index.ts), listed only in devDependencies ("@vsuite/test-utils": "workspace:*"), and never bundled into the CLI or published.

Public API

Export Kind Signature Description
createProject function (files: Record<string, string>) => Promise<{ path: string; read(relativePath: string): Promise<string>; [Symbol.asyncDispose](): Promise<void> }> Creates a temp directory (vsuite-test-*) containing the given files; disposal removes it.

Usage

import { createProject } from "@vsuite/test-utils";
 
await using project = await createProject({ "package.json": '{"dependencies":{"react":"^19"}}' });
const text = await project.read("package.json");