Skip to content

Type check tests#586

Merged
AlexJSully merged 2 commits into
mainfrom
alexjsully-260723-type-check-tsts
Jul 24, 2026
Merged

Type check tests#586
AlexJSully merged 2 commits into
mainfrom
alexjsully-260723-type-check-tsts

Conversation

@AlexJSully

Copy link
Copy Markdown
Owner

No description provided.

@AlexJSully
AlexJSully requested a review from Copilot July 24, 2026 00:18
@AlexJSully AlexJSully self-assigned this Jul 24, 2026
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portfolio Ready Ready Preview, Comment Jul 24, 2026 12:29am

Copilot AI left a comment

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.

Pull request overview

This PR tightens the TypeScript quality gate by ensuring unit tests and Cypress code are type-checked, while also resolving SVG module typing conflicts by aligning the project’s .svg imports with the existing @svgr/webpack setup in a Next.js App Router codebase.

Changes:

  • Type-check Jest test files and add a dedicated cypress/tsconfig.json, updating the tsc script to type-check both the app and Cypress.
  • Align SVG TypeScript declarations with @svgr/webpack and disable Next static image imports to avoid conflicting ambient *.svg typings.
  • Simplify multiple Jest tests by removing redundant per-file setup/mocks and relying on the shared Jest setup.

Reviewed changes

Copilot reviewed 15 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
types/svg.d.ts Updates *.svg typing so default imports are React components (SVGR-aligned).
tsconfig.json Stops excluding .test.* files so Jest tests are type-checked; excludes Cypress from the root project.
src/components/Stars/StarsBackground.test.tsx Switches to jest.requireMock and removes redundant setup import.
src/components/publications/Publications.test.tsx Removes redundant jest-dom import and in-test Next Link mock.
src/components/projects/ProjectsGrid.test.tsx Removes redundant jest-dom import and in-test Next Link mock.
src/components/navbar/Navbar.test.tsx Removes redundant imports and in-test Next Link/Image mocks; keeps pathname mocking.
src/components/footer/Footer.test.tsx Removes redundant jest-dom import and in-test Next Link mock.
src/components/cookie-snackbar/CookieSnackbar.test.tsx Removes redundant jest-dom import.
src/components/banner/Banner.test.tsx Removes redundant jest-dom import.
src/components/banner/Avatar.test.tsx Simplifies test setup and updates assertion to account for next/image src rewriting.
src/app/not-found.test.tsx Removes redundant jest-dom import.
src/app/loading.test.tsx Removes redundant jest-dom import.
package.json Updates tsc to also run tsc -p cypress/tsconfig.json and bumps dependency versions.
next.config.js Disables static image imports to avoid conflicting ambient *.svg typing; documents SVGR handling.
next-env.d.ts Removes next/image-types/global reference to match disabled static image imports.
docs/usage/testing.md Updates testing docs to reflect new npm run tsc behavior and links to Cypress files.
cypress/tsconfig.json Adds Cypress-specific TS project for type-checking Cypress specs/config.
.prettierignore Ignores Python .mypy_cache.
.markdownlintignore Ignores Python .mypy_cache.
.gitignore Ignores Python .mypy_cache and normalizes .nx/cache entry.

Comment thread src/components/banner/Avatar.test.tsx Outdated
@AlexJSully
AlexJSully merged commit de1f00c into main Jul 24, 2026
8 checks passed
@AlexJSully
AlexJSully deleted the alexjsully-260723-type-check-tsts branch July 24, 2026 00:30
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