-
-
Notifications
You must be signed in to change notification settings - Fork 249
test: assert new minified error message on react canary #1199
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| expect, | ||
| test, | ||
| } from '@playwright/test' | ||
| import React from 'react' | ||
| import { x } from 'tinyexec' | ||
| import { normalizePath, type Rollup } from 'vite' | ||
| import { type Fixture, useCreateEditor, useFixture } from './fixture' | ||
|
|
@@ -949,7 +950,7 @@ | |
| editor.edit((s) => | ||
| s.replaceAll(`/* import './server.css' */`, `import './server2.css'`), | ||
| ) | ||
| await expect(page.locator('.test-style-server')).toHaveCSS( | ||
|
Check failure on line 953 in packages/plugin-rsc/e2e/basic.test.ts
|
||
| 'color', | ||
| 'rgb(0, 255, 165)', | ||
| ) | ||
|
|
@@ -1072,7 +1073,7 @@ | |
| 'rgb(0, 165, 255)', | ||
| ) | ||
| editor.reset() | ||
| await expect(page.locator('.test-style-url-server')).toHaveCSS( | ||
|
Check failure on line 1076 in packages/plugin-rsc/e2e/basic.test.ts
|
||
| 'color', | ||
| 'rgb(255, 165, 0)', | ||
| ) | ||
|
|
@@ -1277,6 +1278,12 @@ | |
| await expect(page.getByTestId('action-error-boundary')).toContainText( | ||
| '(Error: boom!)', | ||
| ) | ||
| } else if (/canary|experimental/.test(React.version)) { | ||
| // this is now minified on main | ||
| // https://github.com/facebook/react/pull/36277 | ||
| await expect(page.getByTestId('action-error-boundary')).toContainText( | ||
| '(Error: Minified React error #441', | ||
| ) | ||
| } else { | ||
| await expect(page.getByTestId('action-error-boundary')).toContainText( | ||
| '(Error: An error occurred in the Server Components render.', | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if [[ $# -ne 1 ]]; then | ||||||||||||||||||||||||||||||||
| echo "Usage: $0 <react-version>" >&2 | ||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if ! command -v yq >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||
| echo "yq is required to update pnpm-workspace.yaml" >&2 | ||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+13
|
||||||||||||||||||||||||||||||||
| echo "yq is required to update pnpm-workspace.yaml" >&2 | |
| exit 1 | |
| fi | |
| echo "yq is required to update pnpm-workspace.yaml." >&2 | |
| echo "Please install mikefarah/yq v4: https://github.com/mikefarah/yq/" >&2 | |
| exit 1 | |
| fi | |
| yq_version=$(yq --version 2>&1 || true) | |
| if [[ ! $yq_version =~ version[[:space:]]+v?4\. ]]; then | |
| echo "This script requires mikefarah/yq v4 to update pnpm-workspace.yaml." >&2 | |
| echo "Detected: $yq_version" >&2 | |
| echo "Please install mikefarah/yq v4 and verify with: yq --version" >&2 | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step now depends on
./scripts/override-react.sh, which requiresyq, but the workflow never installs/pinsyq. Relying on a preinstalledyqon GitHub-hosted runners is brittle (runner images can change) and can break scheduled canary/experimental runs. Consider adding an explicit install/pin step for the expected yq v4 binary on Linux before anyyqusage (this also covers the later Vite override step).