This commit is contained in:
Morten Olsen
2024-12-10 20:59:29 +01:00
commit ede2d56b7c
54 changed files with 6955 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/// <reference types="vitest" />
import { resolve } from 'path';
import { defineConfig } from 'vitest/config';
import { findWorkspaceDir } from '@pnpm/find-workspace-dir';
import { findWorkspacePackages } from '@pnpm/find-workspace-packages';
const root = await findWorkspaceDir(process.cwd());
if (!root) {
throw new Error('No workspace found');
}
const packages = await findWorkspacePackages(root);
const alias = Object.fromEntries(
packages.map(({ dir, manifest }) => [
manifest.name!,
resolve(dir, 'src', 'exports.ts'),
]),
);
export default defineConfig({
test: {
alias,
},
});