Repository navigation
fix(curriculum): handle weather data edge cases - #71484
Merged
majestic-owl448 merged 4 commits intoNov 3, 2026
Merged
Conversation
A label that contains its own standalone 0 was passing the zero check even when the measurement was a different number. Both weather labs now treat the last number as the measurement, so numbered labels still pass and a trailing non-zero value fails.
jerome-queck
force-pushed
the
fix/weather-data-handling
branch
from
November 2, 2026 13:04
19a4c62 to
bb1f7f2
Compare
Contributor
Author
|
Thanks for the review! I've applied all three suggestions in bb1f7f2: I removed the extra sentence from both lab descriptions and normalised the case in the test, matching the other tests. Ready for another look. |
majestic-owl448
enabled auto-merge (squash)
November 3, 2026 09:21
majestic-owl448
approved these changes
Nov 3, 2026
majestic-owl448
left a comment
Contributor
There was a problem hiding this comment.
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 🎉
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Checklist:
mainbranch of freeCodeCamp.Closes #71479
Both weather labs currently accept a missing-data check even when
showWeatherrejects asynchronously. Their supplied solutions and expected-value helper also treat valid zero measurements as missing.This updates both lab copies to:
finally. Verify one error alert and preserve the displayed weather, including the actual Paris button interaction.0andundefined, and preserve zero in the expected-value helper.Validation:
git diff --checkpasses.getWeather, numbered labels, and a captured button handler.The DOM harness uses an
innerTextpolyfill and is not a browser-suite pass.FCC_BLOCK=lab-weather-app pnpm run test-curriculum-contentwas blocked before tests started: the available pnpm is 11.25.0, while the repository requires 12. Installing pnpm 12 and Puppeteer's Chrome was blocked by unavailable DNS/network access. The corresponding v2 browser suite, Playwright suite, and full application build were not run locally.