-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(tests): Added test variant flag #18458
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
Conversation
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.
Pull request overview
This PR adds a --variant flag to the E2E test runner, enabling developers to run specific test variants (e.g., different Next.js versions) against individual test applications.
- Adds
--variantflag parsing to support both--variant=<name>and--variant <name>formats - Implements variant matching logic that reads variant configurations from test application
package.jsonfiles - Updates documentation with usage examples and explanation of variant matching behavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
dev-packages/e2e-tests/run.ts |
Adds interfaces for variant configuration, implements variant flag parsing and matching logic, integrates variant build commands into test execution flow |
dev-packages/e2e-tests/README.md |
Documents the new --variant flag usage with examples and explains the case-insensitive partial matching behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
0366df2 to
11ce429
Compare
11ce429 to
86126e5
Compare
| yarn test:run <app-name> --variant <variant-name> | ||
| ``` | ||
|
|
||
| Variant name matching is case-insensitive and partial. For example, `--variant 13` will match `nextjs-pages-dir (next@13)` if a matching variant is present in the test app's `package.json`. |
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.
l: can we show an example of the package.json entry? I'm aware this existed before but I think it's worth mentioning it more explicitly in the readme
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.
Makes sense, I added an example
I have been running a lot of Next.js tests and needed to run specific variants against my changes, so I made these changes to our test runner script and thought to share it with everyone.
Closes #18459 (added automatically)