Repository navigation
fix(test): restore full unit suite to green and run it in CI - #201
Merged
truthixify merged 1 commit intoOct 17, 2026
Merged
Conversation
Align the eight failing tests with the behavior they cover and make the full unit suite a CI gate so regressions cannot merge unnoticed. - jsonld.test.ts: the escape-coverage fixture used '</script>', which contains no ampersand, so expecting \u0026 in the output failed. Use '</script>&' so every escape the serializer emits is exercised. - Stellar.tsx: Helmet still hardcoded English title/description while every other page emits locale-aware metadata from usePageSeo. Wire title, description, canonical, and hreflang alternates from pageSeo, matching the pageSeo translations shipped for en/es/pt. - seo.test.tsx: locale tests asserted hero headings that are never localized (h1 copy is English-only on Stellar and Grants) and a pt case-studies title that does not match the shipped translation. Assert the headings that actually render and the pageSeo titles in the current es/pt translations. - ci.yml: add the Unit Tests job running the full suite against a fresh build so a failing SEO or serverless unit test blocks the PR; the focused Playwright accessibility job stays separate. All 489 tests pass.
|
@gbengaeben Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@gbengaeben is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
truthixify
approved these changes
Oct 17, 2026
truthixify
left a comment
Contributor
There was a problem hiding this comment.
The restored unit gate and SEO corrections pass 60 focused tests and the production build. Approved.
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.
Closes #184
Closes #185
What this fixes
Eight unit tests were failing: one JSON-LD fixture assertion and seven localized SEO page assertions. Two of them failed for environmental reasons in ad-hoc runs, so all nine failure signatures seen locally on a clean checkout are covered below.
JSON-LD fixture (#184)
EXPECTED_ESCAPESasserted\u0026in serialized output, but the fixture input</script>contains no ampersand, so that escape could never appear. The fixture now uses</script>&so every escape the serializer emits (<,>,&) is actually exercised. No assertions on the serializer itself were touched.Locale page tests (#184)
The tests asserted hero headings that are never localized —
Stellar.tsxandGrants.tsxrender English-only h1 copy in every locale — and a Portuguese case-studies title that does not match the shipped translation. The tests now assert what actually renders:pageSeometadata, which is what the tests check next).ptcase-studies title asserted as "Casos de Estudo — Wraith Protocol", matchingpageSeo.caseStudies.titleinsrc/i18n/pt.json.<title>/<meta name="description">now come fromusePageSeolike every other covered page (Home, Grants, Blog, CaseStudies). The component already called the hook but still hardcoded English strings in Helmet, which is what the "emits Portuguese title when locale is pt" test caught:document.titlewas the English default even under/pt/stellar. Helmet now emits the localized title/description plus canonical and hreflang alternates from the samepageSeoentries en/es/pt already ship.No assertions were removed or weakened — the
not.toBe('Stealth payments on Stellar – Wraith Protocol')guard now passes on real behavior instead of a hardcoded fallback.Full unit suite in CI (#185)
pnpm test(489 tests, including SEO and serverless smoke suites) afterpnpm build— the smoke tests serve the builtdist/output, so they only run against a fresh build.Playwright A11y Gate) stays separate and untouched.Unit Teststo required checks in branch protection to make it a required gate.Verification
pnpm test→ 489 passed (30 files), including the previously failingjsonld.test.ts(31/31),seo.test.tsx(29/29), and smoke suites.pnpm build→ clean: content/i18n validation,tsc -b, OG image generation (75 images / 25 routes), sitemap (34 routes), RSS feeds.pnpm format:check,pnpm lint:i18n,pnpm test:smokeall pass.still serves the built site) pass against the built site.