Skip to content

Commit fdfca13

Browse files
committed
angular: update vite config to support vitest workspaces
1 parent eaed1b9 commit fdfca13

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/angular-table/vite.config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
import * as path from 'node:path'
12
import { defineConfig } from 'vitest/config'
2-
import packageJson from './package.json'
33
import angular from '@analogjs/vite-plugin-angular'
4+
import packageJson from './package.json'
45

5-
const angularPlugin = angular({ tsconfig: 'tsconfig.test.json', jit: true })
6+
const tsconfigPath = path.join(import.meta.dirname, 'tsconfig.test.json')
7+
const testDirPath = path.join(import.meta.dirname, 'tests')
8+
const angularPlugin = angular({ tsconfig: tsconfigPath, jit: true })
69

710
export default defineConfig({
811
plugins: [angularPlugin],
912
test: {
1013
name: packageJson.name,
1114
watch: false,
15+
dir: testDirPath,
1216
pool: 'threads',
1317
environment: 'jsdom',
14-
setupFiles: ['./tests/test-setup.ts'],
18+
setupFiles: [path.join(testDirPath, 'test-setup.ts')],
1519
globals: true,
1620
reporters: 'default',
1721
disableConsoleIntercept: true,

0 commit comments

Comments
 (0)