File tree 2 files changed +21
-11
lines changed
2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 128
128
"dev:hooks" : " microbundle watch --raw --no-generateTypes --format cjs --cwd hooks" ,
129
129
"dev:compat" : " microbundle watch --raw --no-generateTypes --format cjs --cwd compat --globals 'preact/hooks=preactHooks'" ,
130
130
"test" : " npm-run-all build lint test:unit" ,
131
- "test:unit" : " run-p test:mocha test:vitest test:ts" ,
131
+ "test:unit" : " run-p test:mocha test:vitest test:vitest:min test: ts" ,
132
132
"test:vitest:watch" : " vitest" ,
133
133
"test:vitest" : " cross-env COVERAGE=true vitest run" ,
134
- "test:vitest:min" : " cross-env MINIFY=true COVERAGE=true vitest run" ,
134
+ "test:vitest:min" : " cross-env MINIFY=true vitest run" ,
135
135
"test:ts" : " run-p test:ts:*" ,
136
136
"test:ts:core" : " tsc -p test/ts/ && mocha --require \" @babel/register\" test/ts/**/*-test.js" ,
137
137
"test:ts:compat" : " tsc -p compat/test/ts/" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { readFileSync } from 'fs';
5
5
import path from 'path' ;
6
6
7
7
const MINIFY = process . env . MINIFY === 'true' ;
8
+ const COVERAGE = process . env . COVERAGE === 'true' ;
8
9
9
10
const root = path . resolve ( __dirname ) ;
10
11
const alias = {
@@ -194,15 +195,24 @@ export default defineConfig({
194
195
} ,
195
196
test : {
196
197
coverage : {
197
- enabled : true ,
198
- include : [
199
- '**/src/**/*' ,
200
- '**/debug/src/**/*' ,
201
- '**/hooks/src/**/*' ,
202
- '**/compeat/src/**/*' ,
203
- '**/jsx-runtime/src/**/*' ,
204
- '**/test-utils/src/**/*'
205
- ] ,
198
+ enabled : COVERAGE ,
199
+ include : MINIFY
200
+ ? [
201
+ '**/dist/preact.mjs' ,
202
+ '**/compat/dist/compat.mjs' ,
203
+ '**/jsx-runtime/dist/jsxRuntime.mjs' ,
204
+ '**/debug/dist/debug.mjs' ,
205
+ '**/hooks/dist/hooks.mjs' ,
206
+ '**/test-utils/dist/testUtils.mjs'
207
+ ]
208
+ : [
209
+ '**/src/**/*' ,
210
+ '**/debug/src/**/*' ,
211
+ '**/hooks/src/**/*' ,
212
+ '**/compeat/src/**/*' ,
213
+ '**/jsx-runtime/src/**/*' ,
214
+ '**/test-utils/src/**/*'
215
+ ] ,
206
216
extension : [ '.js' ] ,
207
217
provider : 'istanbul' ,
208
218
reporter : [ 'html' , 'lcovonly' , 'text-summary' ] ,
You can’t perform that action at this time.
0 commit comments