Unverified Commit a2556196 authored by Balázs Orbán's avatar Balázs Orbán Committed by GitHub

refactor(test): switch tests to use `pnpm` in more places (#63196)

parent d95bc960
......@@ -164,7 +164,7 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
})
// TODO: investigate why this fails when running outside of the Next.js
// monorepo e.g. fails when using yarn create next-app
// monorepo e.g. fails when using pnpm create next-app
// https://github.com/vercel/next.js/pull/23203
test.skip('internal package errors', async () => {
const { session, cleanup } = await sandbox(next)
......
......@@ -151,7 +151,7 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox %s', () => {
})
// TODO: investigate why this fails when running outside of the Next.js
// monorepo e.g. fails when using yarn create next-app
// monorepo e.g. fails when using pnpm create next-app
// https://github.com/vercel/next.js/pull/23203
test.skip('internal package errors', async () => {
const { session, cleanup } = await sandbox(next)
......
......@@ -6,7 +6,7 @@ createNextDescribe(
'experimental-https-server (generated certificate)',
{
files: __dirname,
startCommand: `yarn next ${
startCommand: `pnpm next ${
shouldRunTurboDevTest() ? 'dev --turbo' : 'dev'
} --experimental-https`,
skipStart: !process.env.CI,
......
......@@ -6,7 +6,7 @@ createNextDescribe(
'experimental-https-server (provided certificate)',
{
files: __dirname,
startCommand: `yarn next ${
startCommand: `pnpm next ${
shouldRunTurboDevTest() ? 'dev --turbo' : 'dev'
} --experimental-https --experimental-https-key ./certificates/localhost-key.pem --experimental-https-cert ./certificates/localhost.pem`,
},
......
......@@ -5,7 +5,7 @@ createNextDescribe(
{
files: __dirname,
skipDeployment: true,
startCommand: `yarn next dev --experimental-https`,
startCommand: `pnpm next dev --experimental-https`,
},
({ next }) => {
if (!process.env.CI) {
......
......@@ -12,7 +12,7 @@ createNextDescribe(
packageJson: {
scripts: {
dev: 'node server.js',
build: 'yarn next build apps/host && yarn next build apps/guest',
build: 'next build apps/host && next build apps/guest',
start: 'NODE_ENV=production node server.js',
'post-build': 'echo done',
},
......
......@@ -8,8 +8,8 @@ createNextDescribe(
skipDeployment: true,
dependencies: require('./package.json').dependencies,
startCommand: (global as any).isNextDev
? 'yarn next dev --experimental-test-proxy'
: 'yarn next start --experimental-test-proxy',
? 'pnpm next dev --experimental-test-proxy'
: 'pnpm next start --experimental-test-proxy',
},
({ next, isNextDev }) => {
let proxyServer: Awaited<ReturnType<typeof createProxyServer>>
......
{
"scripts": {
"dev": "yarn next dev",
"build": "yarn next build",
"start": "yarn next start"
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"react": "*",
......
{
"private": true,
"scripts": {
"dev": "yarn next dev",
"build": "yarn next build",
"start": "yarn next start"
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"moment": "*"
......
{
"private": true,
"scripts": {
"dev": "yarn next dev",
"build": "yarn next build",
"start": "yarn next start"
"dev": "next dev",
"build": "next build",
"start": "next start"
}
}
......@@ -26,7 +26,7 @@ const runTests = (project) => {
const runRelayCompiler = () => {
// Relay expects the current directory to contain a relay.json
// This ensures the CWD is the one with relay.json since running
// the relay-compiler through yarn would make the root of the repo the CWD.
// the relay-compiler through pnpm would make the root of the repo the CWD.
execSync('../../../node_modules/relay-compiler/cli.js', {
cwd: './test/integration/relay-graphql-swc-multi-project',
})
......
......@@ -24,7 +24,7 @@ const runTests = () => {
const runRelayCompiler = () => {
// Relay expects the current directory to contain a relay.json
// This ensures the CWD is the one with relay.json since running
// the relay-compiler through yarn would make the root of the repo the CWD.
// the relay-compiler through pnpm would make the root of the repo the CWD.
execSync('../../../node_modules/relay-compiler/cli.js', {
cwd: './test/integration/relay-graphql-swc-single-project',
})
......
......@@ -10,7 +10,7 @@ import { shouldRunTurboDevTest } from './next-test-utils'
export type { NextInstance }
// increase timeout to account for yarn install time
// increase timeout to account for pnpm install time
// if either test runs for the --turbo or have a custom timeout, set reduced timeout instead.
// this is due to current --turbo test have a lot of tests fails with timeouts, ends up the whole
// test job exceeds the 6 hours limit.
......
......@@ -29,7 +29,7 @@ export class NextDevInstance extends NextInstance {
((this as any).turbo || (this as any).experimentalTurbo)
let startArgs = [
'yarn',
'pnpm',
'next',
useTurbo ? getTurbopackFlag() : undefined,
useDirArg && this.testDir,
......
......@@ -55,8 +55,8 @@ export class NextStartInstance extends NextInstance {
},
}
let buildArgs = ['yarn', 'next', 'build']
let startArgs = ['yarn', 'next', 'start']
let buildArgs = ['pnpm', 'next', 'build']
let startArgs = ['pnpm', 'next', 'start']
if (this.buildCommand) {
buildArgs = this.buildCommand.split(' ')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment