Repository navigation
test: cover BUILD_ENV default fallback in the real e2e build - #454
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…real e2e build getBuildContext.ts's 'process.env.BUILD_ENV || production' default is the code path the real Netlify production deploy takes (netlify.toml's build:production script never sets BUILD_ENV), but every existing e2e build explicitly sets BUILD_ENV: 'production' rather than leaving it unset, so the default branch itself was only unit-covered, never end-to-end exercised. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Ready for review: held for a maintainer by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3-L5; an The hive's work on this PR is done. Hive will keep the |
✅ Deploy Preview for cncf-techdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Test Improvement
Adds an e2e describe block that builds with
BUILD_ENVdeleted from thechild process env (rather than set to
'production') and asserts thesame production assertions (edit-this-page link,
og:url) as theexisting explicit-
BUILD_ENV=productionsuite.getBuildContext.ts'sprocess.env.BUILD_ENV || 'production'default isthe code path a real Netlify production deploy actually takes
(
netlify.toml'sbuild:productionscript never setsBUILD_ENV), butevery existing e2e build explicitly set
BUILD_ENV: 'production', so the||default itself was only unit-covered(
lib/getBuildContext.test.mts), never end-to-end exercised. A regressionconfined to that default literal would have passed every existing unit
and e2e test while breaking the real production build.
Related Issue
Part of #451 (that issue folds several
e2e/linkRewrite.test.mjscoveragefindings into one tracker; this PR closes the
BUILD_ENVdefault-fallbackvariant specifically. The issue's original
isAsset/assetBaseUrlshort-circuit finding remains open by design - no e2e test is proposed for
it since the branch isn't reachable through this repo's own Docusaurus
wiring without fabricating a config the site doesn't use)
Filed by quality agent (hold-gated mode). Human review required.
-- hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88