Skip to content

test: run the TypeScript version warning suites in deploy - #99195

Merged
jamiboym merged 2 commits into
canaryfrom
jamiboym/enable-deploy/typescript-version-warnings
Sep 25, 2026
Merged

jamiboym merged 2 commits into
canaryfrom
jamiboym/enable-deploy/typescript-version-warnings

Conversation

@jamiboym

Copy link
Copy Markdown
Contributor

Summary

Both suites assert on build output — one that next build warns 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 skipDeployment plus an if (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.

-  const { next, isNextDeploy, isNextDev, skipped } = nextTestSetup({
+  const { next, isNextDev } = nextTestSetup({
     files: __dirname,
     skipStart: true,
-    skipDeployment: true,
-  if (skipped) { return }
-  if (isNextDeploy || isNextDev) {
+  if (isNextDev) {
     it('should skip', () => {})
     return
   }

The isNextDev half 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, which e2e-utils caps 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 in deprecation-warnings.

Verification

Run against real deployments in deploy mode with webpack, which is the bundler PR CI does not cover:

PASS webpack  typescript-version-warning      57.7s  ✓
PASS webpack  typescript-version-no-warning   81.6s  ✓

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:

🤖 Generated with Claude Code

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]>
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 4255253

@jamiboym
jamiboym marked this pull request as ready for review September 25, 2026 16:43
}

if (isNextDeploy || isNextDev) {
if (isNextDev) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just use @force-gate !dev instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
jamiboym merged commit 2f3842d into canary Sep 25, 2026
119 checks passed
@jamiboym
jamiboym deleted the jamiboym/enable-deploy/typescript-version-warnings branch September 25, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants