@@ -18,6 +18,7 @@ import { projectFilesShouldExist, shouldBeJavascriptProject } from './lib/utils'
18
18
const cli = require . resolve ( 'create-next-app/dist/index.js' )
19
19
const exampleRepo = 'https://github.com/vercel/next.js/tree/canary'
20
20
const examplePath = 'examples/basic-css'
21
+ const env = { ...process . env , COREPACK_ENABLE_STRICT : '0' }
21
22
22
23
const run = ( args : string [ ] , options : execa . Options ) => {
23
24
const conf = new Conf ( { projectName : 'create-next-app' } )
@@ -41,6 +42,7 @@ it('should use npm as the package manager on supplying --use-npm', async () => {
41
42
] ,
42
43
{
43
44
cwd,
45
+ env,
44
46
}
45
47
)
46
48
@@ -62,7 +64,7 @@ it('should use npm as the package manager on supplying --use-npm with example',
62
64
'--example' ,
63
65
`${ exampleRepo } /${ examplePath } ` ,
64
66
] ,
65
- { cwd }
67
+ { cwd, env }
66
68
)
67
69
68
70
expect ( res . exitCode ) . toBe ( 0 )
@@ -96,6 +98,7 @@ it('should use Yarn as the package manager on supplying --use-yarn', async () =>
96
98
] ,
97
99
{
98
100
cwd,
101
+ env,
99
102
}
100
103
)
101
104
@@ -139,7 +142,7 @@ it('should use Yarn as the package manager on supplying --use-yarn with example'
139
142
'--example' ,
140
143
`${ exampleRepo } /${ examplePath } ` ,
141
144
] ,
142
- { cwd }
145
+ { cwd, env }
143
146
)
144
147
145
148
expect ( res . exitCode ) . toBe ( 0 )
@@ -173,6 +176,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm', async () =>
173
176
] ,
174
177
{
175
178
cwd,
179
+ env,
176
180
}
177
181
)
178
182
@@ -216,7 +220,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example'
216
220
'--example' ,
217
221
`${ exampleRepo } /${ examplePath } ` ,
218
222
] ,
219
- { cwd }
223
+ { cwd, env }
220
224
)
221
225
222
226
expect ( res . exitCode ) . toBe ( 0 )
@@ -250,6 +254,7 @@ it('should use Bun as the package manager on supplying --use-bun', async () => {
250
254
] ,
251
255
{
252
256
cwd,
257
+ env,
253
258
}
254
259
)
255
260
@@ -289,7 +294,7 @@ it('should use Bun as the package manager on supplying --use-bun with example',
289
294
'--example' ,
290
295
`${ exampleRepo } /${ examplePath } ` ,
291
296
] ,
292
- { cwd }
297
+ { cwd, env }
293
298
)
294
299
295
300
expect ( res . exitCode ) . toBe ( 0 )
@@ -322,7 +327,7 @@ it('should infer npm as the package manager', async () => {
322
327
] ,
323
328
{
324
329
cwd,
325
- env : { ...process . env , npm_config_user_agent : 'npm' } ,
330
+ env : { ...env , npm_config_user_agent : 'npm' } ,
326
331
}
327
332
)
328
333
@@ -352,7 +357,7 @@ it('should infer npm as the package manager with example', async () => {
352
357
'--example' ,
353
358
`${ exampleRepo } /${ examplePath } ` ,
354
359
] ,
355
- { cwd, env : { ...process . env , npm_config_user_agent : 'npm' } }
360
+ { cwd, env : { ...env , npm_config_user_agent : 'npm' } }
356
361
)
357
362
358
363
const files = [
@@ -394,7 +399,7 @@ it('should infer yarn as the package manager', async () => {
394
399
] ,
395
400
{
396
401
cwd,
397
- env : { ...process . env , npm_config_user_agent : 'yarn' } ,
402
+ env : { ...env , npm_config_user_agent : 'yarn' } ,
398
403
}
399
404
)
400
405
@@ -435,7 +440,7 @@ it('should infer yarn as the package manager with example', async () => {
435
440
'--example' ,
436
441
`${ exampleRepo } /${ examplePath } ` ,
437
442
] ,
438
- { cwd, env : { ...process . env , npm_config_user_agent : 'yarn' } }
443
+ { cwd, env : { ...env , npm_config_user_agent : 'yarn' } }
439
444
)
440
445
441
446
const files = [
@@ -477,7 +482,7 @@ it('should infer pnpm as the package manager', async () => {
477
482
] ,
478
483
{
479
484
cwd,
480
- env : { ...process . env , npm_config_user_agent : 'pnpm' } ,
485
+ env : { ...env , npm_config_user_agent : 'pnpm' } ,
481
486
}
482
487
)
483
488
@@ -518,7 +523,7 @@ it('should infer pnpm as the package manager with example', async () => {
518
523
'--example' ,
519
524
`${ exampleRepo } /${ examplePath } ` ,
520
525
] ,
521
- { cwd, env : { ...process . env , npm_config_user_agent : 'pnpm' } }
526
+ { cwd, env : { ...env , npm_config_user_agent : 'pnpm' } }
522
527
)
523
528
524
529
const files = [
@@ -556,7 +561,7 @@ it('should infer Bun as the package manager', async () => {
556
561
] ,
557
562
{
558
563
cwd,
559
- env : { ...process . env , npm_config_user_agent : 'bun' } ,
564
+ env : { ...env , npm_config_user_agent : 'bun' } ,
560
565
}
561
566
)
562
567
@@ -593,7 +598,7 @@ it('should infer Bun as the package manager with example', async () => {
593
598
'--example' ,
594
599
`${ exampleRepo } /${ examplePath } ` ,
595
600
] ,
596
- { cwd, env : { ...process . env , npm_config_user_agent : 'bun' } }
601
+ { cwd, env : { ...env , npm_config_user_agent : 'bun' } }
597
602
)
598
603
599
604
const files = [
0 commit comments