Skip to content

Updated tests to follow TypeScript test skill - #611

Merged
AlexJSully merged 4 commits into
mainfrom
ajs-261009-update-tests
Oct 9, 2026
Merged

AlexJSully merged 4 commits into
mainfrom
ajs-261009-update-tests

Conversation

@AlexJSully

Copy link
Copy Markdown
Owner

Noticed my own tests were not following the TypeScript test & format skill so updated my tests.

@AlexJSully
AlexJSully requested a balanced review from Copilot October 9, 2026 18:00
@AlexJSully AlexJSully self-assigned this Oct 9, 2026
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
portfolio Ready Ready Preview Oct 9, 2026 8:18pm UTC

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.

🟡 Changes recommended

Several rewritten tests drop behavioural assertions, and unrelated lockfile upgrades remain in scope.

5 open findings
What changed in this PR

Updates the test suite to follow repository TypeScript testing standards, adds coverage for previously untested components, and fixes star-background timer and analytics state handling.

Changes:

  • Strengthens unit and Cypress tests with deterministic inputs and behavioural assertions.
  • Adds tests for layouts, pages, error states, and service-worker registration.
  • Updates testing guidance and related architecture documentation.
File Description
src/​util/​panelState.test.ts Adds panel-closing cases.
src/​util/​negotiateContentType.test.ts Converts cases to named rows.
src/​util/​markdown/​policyMarkdown.test.ts Simplifies policy assertions.
src/​util/​markdown/​llmsTxt.test.ts Prevents vacuous collection tests.
src/​util/​markdown/​homeMarkdown.test.ts Verifies policy placement.
src/​util/​linkIcon.test.ts Uses deterministic hue expectations.
src/​util/​isNetworkFast.test.ts Expands connection-state coverage.
src/​util/​focusMainContent.test.ts Uses a realistic focus transfer.
src/​util/​consent/​consentStore.test.ts Freezes time and strengthens cookie assertions.
src/​util/​consent/​clearUnconsentedStorage.test.ts Separates consent-purpose cases.
src/​util/​absoluteUrl.test.ts Uses named URL cases.
src/​proxy.test.ts Strengthens redirect, rewrite, and request cases.
src/​layouts/​GeneralLayout.test.tsx Uses semantic queries and timer cleanup.
src/​images/​icons.test.tsx Tests all exported icons dynamically.
src/​helpers/​ascii.test.ts Improves debounce timing coverage.
src/​helpers/​aaaahhhh.test.ts Replaces DOM mocks with real fixtures.
src/​data/​structuredData.test.ts Removes the static-data test file.
src/​configs/​sentry.test.ts Makes environment configuration deterministic.
src/​configs/​firebase.test.ts Verifies explicit Firebase configuration.
src/​components/​Stars/​StarsBackground.tsx Fixes stale analytics state and timeout cleanup.
src/​components/​Stars/​StarsBackground.test.tsx Adds deterministic star and cleanup tests.
src/​components/​ServiceWorkerRegister.test.tsx Adds registration and retry coverage.
src/​components/​publications/​Publications.test.tsx Strengthens rendering and analytics assertions.
src/​components/​projects/​ProjectsGrid.test.tsx Expands visibility, preview, and responsive tests.
src/​components/​policy/​gate/​PolicyDialogGate.test.tsx Covers loading and close transitions.
src/​components/​policy/​dialog/​PolicyDialog.test.tsx Removes redundant URL assertion.
src/​components/​policy/​content/​PolicyContent.test.tsx Scopes consent-switch assertions.
src/​components/​pill-button/​PillButton.test.tsx Adds size styling cases.
src/​components/​panel-link/​PanelLink.test.tsx Covers all modified-click variants.
src/​components/​navbar/​Navbar.test.tsx Consolidates navigation cases.
src/​components/​link-icon/​LinkIcon.test.tsx Uses the presentation role.
src/​components/​footer/​Footer.test.tsx Verifies exact analytics events.
src/​components/​consent/​services/​ConsentedServices.test.tsx Strengthens consent-service lifecycle tests.
src/​components/​consent/​controls/​ConsentControls.test.tsx Expands stored-choice assertions.
src/​components/​consent/​banner/​ConsentBanner.test.tsx Strengthens styling and control assertions.
src/​components/​banner/​Banner.test.tsx Verifies name wrapping.
src/​components/​banner/​Avatar.test.tsx Adds complete sneeze and easter-egg coverage.
src/​app/​page.test.tsx Adds home-page coverage.
src/​app/​not-found.test.tsx Adds reload-path coverage.
src/​app/​layout.test.tsx Adds layout and JSON-LD coverage.
src/​app/​global-error.test.tsx Adds reload-path coverage.
src/​app/​error.test.tsx Adds error-page coverage.
package-lock.json Updates two transitive resolutions.
docs/​usage/​testing.md Expands the Cypress example.
docs/​architecture/​components/​stars.md Synchronizes star behaviour and coverage docs.
docs/​architecture/​components/​navbar.md Synchronizes navbar coverage docs.
cypress/​e2e/​security/​security.cy.ts Removes a non-behavioural security test.
cypress/​e2e/​security/​image.cy.ts Strengthens image-optimizer security checks.
cypress/​e2e/​security/​headers.cy.ts Strengthens forged-header redirect checks.
cypress/​e2e/​landing.cy.ts Adds a hydration and idle gate.
.github/​copilot-instructions.md Clarifies test-file exclusions.
.claude/​skills/​typescript-code-and-test-standards/​SKILL.md Clarifies static-module testing guidance.
.claude/​skills/​typescript-code-and-test-standards/​references/​test-standards.md Expands exemption guidance.
.claude/​skills/​typescript-code-and-test-standards/​assets/​project-rules.template.md Updates exemption terminology.
.claude/​skills/​typescript-code-and-test-standards/​agents/​test-quality-reviewer.md Adds static-module review guidance.
.claude/​scripts/​plugin-manifests.test.mjs Removes redundant symbolic-link cases.
.claude/​scripts/​check-skill-publishability.test.mjs Removes redundant nested-file coverage.
.claude/​rules/​testing.md Defines modules that receive no test file.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/consent/controls/ConsentControls.test.tsx Outdated
Comment thread src/components/pill-button/PillButton.test.tsx
Comment thread src/util/markdown/policyMarkdown.test.ts
Comment thread docs/usage/testing.md Outdated
Comment thread src/util/isNetworkFast.test.ts Outdated
@AlexJSully
AlexJSully merged commit 7a94fc7 into main Oct 9, 2026
2 checks passed
@AlexJSully
AlexJSully deleted the ajs-261009-update-tests branch October 9, 2026 20:27

This branch was successfully deployed

1 active deployment
Preview — f79e8ab0 Deployed Oct 9, 2026 by vercel[bot]
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