Skip to content

test: add scoped deployment test exclusions - #98057

Closed
gnoff wants to merge 1 commit into
jstory/deploy-tests/skip-rationalesfrom
jstory/deploy-tests/skip-deployment-blocks
Closed

gnoff wants to merge 1 commit into
jstory/deploy-tests/skip-rationalesfrom
jstory/deploy-tests/skip-deployment-blocks

Conversation

@gnoff

@gnoff gnoff commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Use the existing @force-gate !deploy directive to exclude only the external-package block in the cache-components dynamic-import suite from deployment testing.

The adjacent rationale explains that this block intentionally verifies a failed build, so it cannot produce a deployment. Deploy-compatible sibling tests in the same Jest file remain runnable, and deployment CI reports the excluded block through Jest's native skip mechanism.

Verification

  • pnpm exec jest --runInBand test/unit/gate/
  • pnpm prettier --with-node-modules --ignore-path .prettierignore --write test/e2e/app-dir/cache-components-dynamic-imports/cache-components-dynamic-imports.test.ts
  • npx eslint --config eslint.config.mjs --fix test/e2e/app-dir/cache-components-dynamic-imports/cache-components-dynamic-imports.test.ts

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 9267ac3

@gnoff
gnoff force-pushed the jstory/deploy-tests/skip-rationales branch from 52702e6 to 6b6b464 Compare August 28, 2026 23:33
@gnoff
gnoff force-pushed the jstory/deploy-tests/skip-deployment-blocks branch 2 times, most recently from 07887fe to 45664ca Compare August 28, 2026 23:46
@gnoff
gnoff force-pushed the jstory/deploy-tests/skip-rationales branch from 6b6b464 to af04f26 Compare August 28, 2026 23:46
Comment thread test/jest-setup-after-env.ts Outdated
@gnoff
gnoff force-pushed the jstory/deploy-tests/skip-deployment-blocks branch from 45664ca to 010bae1 Compare August 29, 2026 00:00
@gnoff
gnoff marked this pull request as ready for review August 29, 2026 00:05
## Summary

Add a reason-bearing `skipDeployment` test global that reports omitted blocks as skipped without focusing the entire Jest file.

Declare the global type from the included test-library module while installing the runtime implementation in Jest setup, so root TypeScript checks can resolve it.

Use it for the cache-components dynamic-import external-package block so the deploy-compatible sibling suite is no longer suppressed.

## Verification

- `pnpm exec jest --runInBand test/unit/skip-deployment/skip-deployment.test.ts`
- `pnpm test-start-turbo test/e2e/app-dir/cache-components-dynamic-imports/cache-components-dynamic-imports.test.ts`
- `pnpm lint-typescript --log-order=stream`
- `pnpm types:test-lib`

<!-- NEXT_JS_LLM -->
@gnoff
gnoff force-pushed the jstory/deploy-tests/skip-deployment-blocks branch from 010bae1 to 9267ac3 Compare August 29, 2026 21:57
@gnoff gnoff closed this Sep 2, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants