Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions frontend/src/__tests__/vitest-config.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { describe, expect, it } from 'vitest';
import fs from 'fs';
import path from 'path';

// Regression guard for https://github.com/LabsCrypt/flowfi/issues/1281:
// having both vitest.config.ts and vitest.config.mts at the same time makes
// the resolved test config ambiguous (Vite/Vitest pick one based on
// extension resolution order, which is not obvious to contributors and can
// silently disable the "other" config's environment, setup file, and
// coverage thresholds). Only one vitest.config.* should ever exist.
describe('vitest config', () => {
it('has exactly one vitest.config.* file in the frontend package', () => {
const frontendRoot = path.resolve(__dirname, '..', '..');
const configFiles = fs
.readdirSync(frontendRoot)
.filter((f) => /^vitest\.config\.(ts|mts|cts|js|mjs|cjs)$/.test(f));

expect(configFiles).toEqual(['vitest.config.ts']);
});
});
30 changes: 0 additions & 30 deletions frontend/src/test-setup.ts

This file was deleted.

18 changes: 0 additions & 18 deletions frontend/vitest.config.mts

This file was deleted.

Loading