File tree Expand file tree Collapse file tree 4 files changed +53
-53
lines changed Expand file tree Collapse file tree 4 files changed +53
-53
lines changed Original file line number Diff line number Diff line change 1
- import { build } from '@e2e/helper' ;
2
- import { expect , test } from '@playwright/test' ;
1
+ import { build , rspackOnlyTest } from '@e2e/helper' ;
2
+ import { expect } from '@playwright/test' ;
3
3
4
- // TODO: fix this test
5
- test . skip ( 'generate integrity for async script tags in prod build' , async ( {
6
- page,
7
- } ) => {
8
- const rsbuild = await build ( {
9
- cwd : __dirname ,
10
- page,
11
- } ) ;
4
+ rspackOnlyTest (
5
+ 'generate integrity for async script tags in prod build' ,
6
+ async ( { page } ) => {
7
+ const rsbuild = await build ( {
8
+ cwd : __dirname ,
9
+ page,
10
+ } ) ;
12
11
13
- const { content } = await rsbuild . getIndexFile ( ) ;
12
+ const { content } = await rsbuild . getIndexFile ( ) ;
14
13
15
- expect ( content . includes ( 'sriHashes={' ) && content . includes ( '"sha384-' ) ) . toBe (
16
- true ,
17
- ) ;
14
+ expect (
15
+ content . includes ( 'sriHashes={' ) && content . includes ( '"sha384-' ) ,
16
+ ) . toBe ( true ) ;
18
17
19
- const testEl = page . locator ( '#root' ) ;
20
- await expect ( testEl ) . toHaveText ( 'foo' ) ;
21
- await rsbuild . close ( ) ;
22
- } ) ;
18
+ const testEl = page . locator ( '#root' ) ;
19
+ await expect ( testEl ) . toHaveText ( 'foo' ) ;
20
+ await rsbuild . close ( ) ;
21
+ } ,
22
+ ) ;
Original file line number Diff line number Diff line change 1
- import { build } from '@e2e/helper' ;
2
- import { expect , test } from '@playwright/test' ;
1
+ import { build , rspackOnlyTest } from '@e2e/helper' ;
2
+ import { expect } from '@playwright/test' ;
3
3
4
- // TODO: fix this test
5
- test . skip ( 'generate integrity for preload tags in prod build' , async ( {
6
- page,
7
- } ) => {
8
- const rsbuild = await build ( {
9
- cwd : __dirname ,
10
- page,
11
- } ) ;
4
+ rspackOnlyTest (
5
+ 'generate integrity for preload tags in prod build' ,
6
+ async ( { page } ) => {
7
+ const rsbuild = await build ( {
8
+ cwd : __dirname ,
9
+ page,
10
+ } ) ;
12
11
13
- const files = await rsbuild . getDistFiles ( ) ;
14
- const html =
15
- files [ Object . keys ( files ) . find ( ( file ) => file . endsWith ( 'index.html' ) ) ! ] ;
12
+ const files = await rsbuild . getDistFiles ( ) ;
13
+ const html =
14
+ files [ Object . keys ( files ) . find ( ( file ) => file . endsWith ( 'index.html' ) ) ! ] ;
16
15
17
- expect ( html ) . toMatch (
18
- / < l i n k h r e f = " \/ s t a t i c \/ j s \/ a s y n c \/ f o o \. \w { 8 } \. j s " r e l = " p r e l o a d " a s = " s c r i p t " i n t e g r i t y = " s h a 3 8 4 - [ A - Z a - z 0 - 9 + / = ] + " / ,
19
- ) ;
16
+ expect ( html ) . toMatch (
17
+ / < l i n k h r e f = " \/ s t a t i c \/ j s \/ a s y n c \/ f o o \. \w { 8 } \. j s " r e l = " p r e l o a d " a s = " s c r i p t " i n t e g r i t y = " s h a 3 8 4 - [ A - Z a - z 0 - 9 + / = ] + " / ,
18
+ ) ;
20
19
21
- const testEl = page . locator ( '#root' ) ;
22
- await expect ( testEl ) . toHaveText ( 'Hello Rsbuild!' ) ;
23
- await rsbuild . close ( ) ;
24
- } ) ;
20
+ const testEl = page . locator ( '#root' ) ;
21
+ await expect ( testEl ) . toHaveText ( 'Hello Rsbuild!' ) ;
22
+ await rsbuild . close ( ) ;
23
+ } ,
24
+ ) ;
Original file line number Diff line number Diff line change 52
52
"bump" : " npx bumpp --no-tag"
53
53
},
54
54
"dependencies" : {
55
- "@rspack/core" : " 1.4.4 " ,
55
+ "@rspack/core" : " 1.4.2 " ,
56
56
"@rspack/lite-tapable" : " ~1.0.1" ,
57
57
"@swc/helpers" : " ^0.5.17" ,
58
58
"core-js" : " ~3.43.0" ,
You can’t perform that action at this time.
0 commit comments