Repository navigation
Updated tests to follow TypeScript test skill - #611
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several rewritten tests drop behavioural assertions, and unrelated lockfile upgrades remain in scope.
5 open findings
Retain assertion that actions share the Save choices row · New Retain assertion for PillButton contained variant · New Restore direct exclusion assertion for consentControls · New Limit description to the guarantees verified by the assertions · New Rename test title to use a third-person verb phrase · New
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.
This branch was successfully deployed
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.


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