test: run the TypeScript version warning suites in deploy - #99195
Merged
jamiboym merged 2 commits intoSep 25, 2026
Merged
Conversation
Both suites assert on build output — that `next build` warns about an old TypeScript version, and that it stays quiet on a current one. Deploy captures build output, so there is nothing here a deployment cannot observe. They were excluded by `skipDeployment` plus an `if (isNextDeploy || isNextDev)` return that reads as caution rather than a finding: no incompatibility is recorded, and neither suite touches the filesystem or the local CLI. Drop the exclusion and narrow the guard to `isNextDev`, which is the part that holds: the warning is emitted during a build, and there is no build in dev. Each calls `next.start()` inside the test body, which `e2e-utils` caps at 60 seconds without an explicit timeout. A deployment now takes about two minutes, so both get 240s, matching the other deploy suites and avoiding the failure #99162 had to fix in `deprecation-warnings`. Verified in deploy mode with webpack against a real deployment: 57.7s and 81.6s, both passing. Also green in start mode with Turbopack. Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
Tests PassedCommit: 4255253 |
jamiboym
marked this pull request as ready for review
September 25, 2026 16:43
gnoff
approved these changes
Sep 25, 2026
| } | ||
|
|
||
| if (isNextDeploy || isNextDev) { | ||
| if (isNextDev) { |
Contributor
There was a problem hiding this comment.
should we just use @force-gate !dev instead?
Contributor
Author
There was a problem hiding this comment.
Done in 4255253 — // @force-gate !dev on both describes, with the isNextDev destructure and the it('should skip') placeholder removed.
Verified locally with webpack:
- dev:
Test Suites: 2 skipped, 0 of 2 total— a real collection-time skip with no fixture boot, where before it was a fake-green placeholder test. - start: both pass.
- deploy: both pass against real deployments (52s and 69s).
Worth noting for the neighbouring PRs: !dev is a static condition, so this is decided at collection through Jest's own skip. It never reaches buildForceGated, which is !skipStart && !isNextDeploy && hasLazyForceGate(...) — that carve-out only applies to lazy gates. This suite also passes skipStart: true, so it is outside it twice over.
Replaces the `if (isNextDev) { it('should skip'); return }` pattern per
review. The warning is emitted by `next build`, so dev has nothing to
observe; a static `@force-gate` turns the fake-green placeholder into a
real Jest skip at collection and drops the now-unused `isNextDev`.
Verified locally with webpack: dev reports 2 skipped suites with no
fixture boot, start passes, and deploy passes against real deployments
(52s and 69s).
Co-Authored-By: Claude Opus 5 <[email protected]>
jamiboym
deleted the
jamiboym/enable-deploy/typescript-version-warnings
branch
September 25, 2026 21:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both suites assert on build output — one that
next buildwarns about TypeScript 4.0.6, the other that it stays quiet on a current version. Deploy captures build output, so there is nothing here a deployment cannot observe.They were excluded by
skipDeploymentplus anif (isNextDeploy || isNextDev)return that reads as caution rather than a finding: no incompatibility is recorded anywhere, and neither suite touches the filesystem or the local CLI.The
isNextDevhalf of the guard is the part that holds — the warning is emitted during a build, and there is no build in dev.The 240s timeout is not incidental
Each suite calls
next.start()inside the test body, whiche2e-utilscaps at 60 seconds when no explicit timeout is given. Deployments now take about two minutes, so without this both would time out on every run — the same failure #99162 had to fix indeprecation-warnings.Verification
Run against real deployments in deploy mode with webpack, which is the bundler PR CI does not cover:
Also green in start mode with Turbopack. ESLint and Prettier clean.
Two suites I deliberately left out
These came from the same review of 19 suites that reported green in ~2.4s without running anything:
url-importsis correctly excluded. It starts a local static server on port 12345 and imports from it, so no deployment can reach its source regardless of bundler. ItsskipDeploymentis load-bearing.webpack-loader-parse-erroris already being enabled in test: enable deploy coverage for asset and compiler errors #98850.🤖 Generated with Claude Code