Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): set COREPACK_ENABLE_STRICT: 0 for create-next-app tests #56955

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions test/integration/create-next-app/package-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { projectFilesShouldExist, shouldBeJavascriptProject } from './lib/utils'
const cli = require.resolve('create-next-app/dist/index.js')
const exampleRepo = 'https://github.com/vercel/next.js/tree/canary'
const examplePath = 'examples/basic-css'
const env = { ...process.env, COREPACK_ENABLE_STRICT: '0' }

const run = (args: string[], options: execa.Options) => {
const conf = new Conf({ projectName: 'create-next-app' })
Expand All @@ -41,6 +42,7 @@ it('should use npm as the package manager on supplying --use-npm', async () => {
],
{
cwd,
env,
}
)

Expand All @@ -62,7 +64,7 @@ it('should use npm as the package manager on supplying --use-npm with example',
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd }
{ cwd, env }
)

expect(res.exitCode).toBe(0)
Expand Down Expand Up @@ -96,6 +98,7 @@ it('should use Yarn as the package manager on supplying --use-yarn', async () =>
],
{
cwd,
env,
}
)

Expand Down Expand Up @@ -139,7 +142,7 @@ it('should use Yarn as the package manager on supplying --use-yarn with example'
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd }
{ cwd, env }
)

expect(res.exitCode).toBe(0)
Expand Down Expand Up @@ -173,6 +176,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm', async () =>
],
{
cwd,
env,
}
)

Expand Down Expand Up @@ -216,7 +220,7 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example'
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd }
{ cwd, env }
)

expect(res.exitCode).toBe(0)
Expand Down Expand Up @@ -250,6 +254,7 @@ it('should use Bun as the package manager on supplying --use-bun', async () => {
],
{
cwd,
env,
}
)

Expand Down Expand Up @@ -289,7 +294,7 @@ it('should use Bun as the package manager on supplying --use-bun with example',
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd }
{ cwd, env }
)

expect(res.exitCode).toBe(0)
Expand Down Expand Up @@ -322,7 +327,7 @@ it('should infer npm as the package manager', async () => {
],
{
cwd,
env: { ...process.env, npm_config_user_agent: 'npm' },
env: { ...env, npm_config_user_agent: 'npm' },
}
)

Expand Down Expand Up @@ -352,7 +357,7 @@ it('should infer npm as the package manager with example', async () => {
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd, env: { ...process.env, npm_config_user_agent: 'npm' } }
{ cwd, env: { ...env, npm_config_user_agent: 'npm' } }
)

const files = [
Expand Down Expand Up @@ -394,7 +399,7 @@ it('should infer yarn as the package manager', async () => {
],
{
cwd,
env: { ...process.env, npm_config_user_agent: 'yarn' },
env: { ...env, npm_config_user_agent: 'yarn' },
}
)

Expand Down Expand Up @@ -435,7 +440,7 @@ it('should infer yarn as the package manager with example', async () => {
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd, env: { ...process.env, npm_config_user_agent: 'yarn' } }
{ cwd, env: { ...env, npm_config_user_agent: 'yarn' } }
)

const files = [
Expand Down Expand Up @@ -477,7 +482,7 @@ it('should infer pnpm as the package manager', async () => {
],
{
cwd,
env: { ...process.env, npm_config_user_agent: 'pnpm' },
env: { ...env, npm_config_user_agent: 'pnpm' },
}
)

Expand Down Expand Up @@ -518,7 +523,7 @@ it('should infer pnpm as the package manager with example', async () => {
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd, env: { ...process.env, npm_config_user_agent: 'pnpm' } }
{ cwd, env: { ...env, npm_config_user_agent: 'pnpm' } }
)

const files = [
Expand Down Expand Up @@ -556,7 +561,7 @@ it('should infer Bun as the package manager', async () => {
],
{
cwd,
env: { ...process.env, npm_config_user_agent: 'bun' },
env: { ...env, npm_config_user_agent: 'bun' },
}
)

Expand Down Expand Up @@ -593,7 +598,7 @@ it('should infer Bun as the package manager with example', async () => {
'--example',
`${exampleRepo}/${examplePath}`,
],
{ cwd, env: { ...process.env, npm_config_user_agent: 'bun' } }
{ cwd, env: { ...env, npm_config_user_agent: 'bun' } }
)

const files = [
Expand Down
Loading