Skip to content
Merged
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
4 changes: 3 additions & 1 deletion apps/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
"@types/node": "^24.0.3",
"eslint": "^9.18.0",
"eslint-config-next": "15.5.2",
"jsdom": "^26.1.0",
"postcss": "^8.5.4",
"tailwindcss": "^4.1.8",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"vitest": "^3.2.7"
},
"peerDependencies": {
"react": "^19.1.1",
Expand Down
17 changes: 16 additions & 1 deletion apps/portal/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
import { resolve } from 'path';
import { defineConfig } from 'vitest/config';

// No vite plugins on purpose: esbuild already transforms TSX with the automatic
// JSX runtime, and plugin types (e.g. @vitejs/plugin-react, vite-tsconfig-paths)
// can clash with vitest's bundled vite during Next's build-time typecheck on
// Vercel. Aliases are mirrored by hand from tsconfig instead — see
// apps/framework-editor/vitest.config.ts for the same approach.
export default defineConfig({
test: {
environment: 'node',
// jsdom, not node: the include glob covers component tests (.jsx/.tsx) that
// need DOM APIs (e.g. testing-library's render). Matches apps/app and
// apps/framework-editor. Node-only tests run fine under jsdom too.
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
exclude: ['node_modules', 'dist', '.next'],
},
resolve: {
// Mirror the tsconfig `@/*` path alias so tests can import via `@/...`.
alias: {
'@': resolve(__dirname, './src'),
},
},
});
2 changes: 2 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading