5dc29141d5
Adds a new Federation Graph page to display subgraphs and their schemas. Implements loading state and error handling. Enhances coverage reporting by including 'lcov' format for better insights into test coverage metrics.
53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
import vue from '@vitejs/plugin-vue'
|
|
import { dirname,resolve } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = dirname(__filename)
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./test/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
include: [
|
|
'app/utils/**/*.{ts,js}',
|
|
'app/components/**/*.vue',
|
|
'app/composables/**/*.{ts,js}',
|
|
'app/hooks/**/*.{ts,js}',
|
|
'app/store/**/*.{ts,js}',
|
|
],
|
|
exclude: [
|
|
'app/graphql/generated.ts', // GraphQL generated code
|
|
'**/*.d.ts',
|
|
'**/*.config.*',
|
|
'**/node_modules/**',
|
|
'**/test/**',
|
|
'**/__tests__/**',
|
|
'**/*.spec.ts',
|
|
'**/*.test.ts',
|
|
],
|
|
// TODO: Re-enable coverage thresholds once we have more test coverage
|
|
// thresholds: {
|
|
// statements: 70,
|
|
// branches: 70,
|
|
// functions: 70,
|
|
// lines: 70,
|
|
// },
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'~': resolve(__dirname, './app'),
|
|
'~~': resolve(__dirname, '.'),
|
|
'@': resolve(__dirname, './app'),
|
|
},
|
|
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
|
},
|
|
})
|