mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 05:46:34 +00:00
[PUI] Add coverage testing (#6881)
* add coverage to PUI * fix testing command * always do all steps * fix test assumptions * add test for serving and logging into pui from django / cui tech stack * fix up coverage * fix intentation * remove paralell flags * remove coverage finish step * remove flag * change names * add full clickdown test * more tests * more tests * sprinkle in some timeouts * try using admin * disable page 1 tests for now * remove additional tests for now * only build sourcemaps if coverage is enabled * fix sourcemap assumption * Update .github/workflows/qc_checks.yaml Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> * fix package.json * add finish step --------- Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { platform, release } from 'node:os';
|
||||
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
||||
import istanbul from 'vite-plugin-istanbul';
|
||||
|
||||
const IS_IN_WSL = platform().includes('WSL') || release().includes('WSL');
|
||||
const is_coverage = process.env.VITE_COVERAGE === 'true';
|
||||
|
||||
if (IS_IN_WSL) {
|
||||
console.log('WSL detected: using polling for file system events');
|
||||
@ -16,11 +18,18 @@ export default defineConfig({
|
||||
plugins: ['macros']
|
||||
}
|
||||
}),
|
||||
splitVendorChunkPlugin()
|
||||
splitVendorChunkPlugin(),
|
||||
istanbul({
|
||||
include: 'src/*',
|
||||
exclude: ['node_modules', 'test/'],
|
||||
extension: ['.js', '.ts', '.tsx'],
|
||||
requireEnv: true
|
||||
})
|
||||
],
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: '../../src/backend/InvenTree/web/static/web'
|
||||
outDir: '../../src/backend/InvenTree/web/static/web',
|
||||
sourcemap: is_coverage
|
||||
},
|
||||
server: {
|
||||
watch: {
|
||||
|
Reference in New Issue
Block a user