File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
dev-packages/e2e-tests/test-applications Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 88 "clean" : " npx rimraf node_modules pnpm-lock.yaml" ,
99 "test:prod" : " TEST_ENV=production playwright test" ,
1010 "test:dev" : " TEST_ENV=development playwright test" ,
11+ "test:dev-webpack" : " TEST_ENV=development-webpack playwright test" ,
1112 "test:build" : " pnpm install && pnpm build" ,
1213 "test:test-build" : " pnpm ts-node --script-mode assert-build.ts" ,
1314 "test:build-canary" : " pnpm install && pnpm add next@canary && pnpm add react@latest && pnpm add react-dom@latest && pnpm build:webpack" ,
4445 "optionalVariants" : [
4546 {
4647 "build-command" : " pnpm test:build-canary" ,
47- "label" : " nextjs-app-dir (canary, webpack opt-in)"
48+ "label" : " nextjs-app-dir (canary, webpack opt-in)" ,
49+ "assert-command" : " pnpm test:prod && pnpm test:dev-webpack"
4850 },
4951 {
5052 "build-command" : " pnpm test:build-latest" ,
Original file line number Diff line number Diff line change @@ -5,8 +5,16 @@ if (!testEnv) {
55 throw new Error ( 'No test env defined' ) ;
66}
77
8+ const getStartCommand = ( ) => {
9+ if ( testEnv === 'development-webpack' ) {
10+ return 'pnpm next dev -p 3030 --webpack' ;
11+ }
12+
13+ return testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030' ;
14+ } ;
15+
816const config = getPlaywrightConfig ( {
9- startCommand : testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030' ,
17+ startCommand : getStartCommand ( ) ,
1018 port : 3030 ,
1119} ) ;
1220
Original file line number Diff line number Diff line change 88 "clean" : " npx rimraf node_modules pnpm-lock.yaml" ,
99 "test:prod" : " TEST_ENV=production playwright test" ,
1010 "test:dev" : " TEST_ENV=development playwright test" ,
11+ "test:dev-webpack" : " TEST_ENV=development-webpack playwright test" ,
1112 "test:build" : " pnpm install && pnpm build" ,
1213 "test:test-build" : " pnpm ts-node --script-mode assert-build.ts" ,
1314 "test:build-canary" : " pnpm install && pnpm add next@canary && pnpm add react@latest && pnpm add react-dom@latest && pnpm build:webpack" ,
4445 "optionalVariants" : [
4546 {
4647 "build-command" : " pnpm test:build-canary" ,
47- "label" : " nextjs-pages-dir (canary, webpack opt-in)"
48+ "label" : " nextjs-pages-dir (canary, webpack opt-in)" ,
49+ "assert-command" : " pnpm test:prod && pnpm test:dev-webpack"
4850 },
4951 {
5052 "build-command" : " pnpm test:build-latest" ,
Original file line number Diff line number Diff line change @@ -5,8 +5,16 @@ if (!testEnv) {
55 throw new Error ( 'No test env defined' ) ;
66}
77
8+ const getStartCommand = ( ) => {
9+ if ( testEnv === 'development-webpack' ) {
10+ return 'pnpm next dev -p 3030 --webpack' ;
11+ }
12+
13+ return testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030' ;
14+ } ;
15+
816const config = getPlaywrightConfig ( {
9- startCommand : testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030' ,
17+ startCommand : getStartCommand ( ) ,
1018 port : 3030 ,
1119} ) ;
1220
You can’t perform that action at this time.
0 commit comments