File tree Expand file tree Collapse file tree 2 files changed +30
-12
lines changed Expand file tree Collapse file tree 2 files changed +30
-12
lines changed Original file line number Diff line number Diff line change 34
34
npm install -D @playwright/test @web/test-runner-playwright
35
35
npx playwright install --with-deps chromium firefox webkit
36
36
- name : Run tests
37
- run : npm test
37
+ run : npx web- test-runner --config web-test-runner.config.mjs
38
38
test_win :
39
39
name : " Windows"
40
40
runs-on : windows-latest
53
53
npm install -D @playwright/test @web/test-runner-playwright
54
54
npx playwright install --with-deps chromium firefox webkit
55
55
- name : Run tests
56
- run : npm test
56
+ run : npx web- test-runner --config web-test-runner.config.mjs
57
57
tag :
58
58
name : " Publishing release"
59
59
if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change
1
+ import { playwrightLauncher } from '@web/test-runner-playwright' ;
2
+
1
3
export default {
2
- files : 'test/**/*.test.js' ,
3
- nodeResolve : true ,
4
- middleware : [
5
- function rewriteBase ( context , next ) {
6
- if ( context . url . indexOf ( '/base' ) === 0 ) {
7
- context . url = context . url . replace ( '/base' , '' )
8
- }
9
- return next ( ) ;
10
- }
11
- ]
4
+ files : 'test/**/*.test.js' ,
5
+ nodeResolve : true ,
6
+ coverage : true ,
7
+ browsers : [
8
+ playwrightLauncher ( { product : 'chromium' } ) ,
9
+ playwrightLauncher ( { product : 'firefox' } ) ,
10
+ playwrightLauncher ( { product : 'webkit' } )
11
+ ] ,
12
+ testFramework : {
13
+ config : {
14
+ timeout : '60000' ,
15
+ } ,
16
+ } ,
17
+ browserStartTimeout : 60000 ,
18
+ testsStartTimeout : 60000 ,
19
+ testsFinishTimeout : 60000 ,
20
+ coverageConfig : {
21
+ include : [ 'src/**/*.js' ] ,
22
+ exclude : [ 'test/**/*.js' , 'demo/**/*.js' ] ,
23
+ threshold : {
24
+ statements : 80 ,
25
+ branches : 80 ,
26
+ functions : 80 ,
27
+ lines : 80
28
+ }
29
+ }
12
30
} ;
You can’t perform that action at this time.
0 commit comments