Repository navigation
Description
Describe the Issue
The following files have two problems in their supplied solutions and tests:
curriculum/challenges/english/blocks/lab-weather-app/66f12a88741aeb16b9246c59.mdcurriculum/challenges/english/blocks/lab-weather-app-v2/66f12a88741aeb16b9246c59.md
-
Missing weather data causes an asynchronous rejection that the test does not check. The missing-data test uses:
assert.doesNotThrow(showWeather);assert.doesNotThrow(() => showWeather(city));These assertions check synchronous exceptions but do not await the promise returned by
showWeather. The supplied solution immediately destructures the result ofawait getWeather(city), even when that result isundefined.With the lab's Paris mock,
showWeather("paris")displays the required alert, then rejects withCannot destructure property 'weather' of 'json' as it is undefined.The missing-data test does not detect this rejection. Its temporarygetWeatherreplacement is also restored before the asynchronous calls finish. -
Valid zero measurements display as missing data. The solution uses truthiness checks for temperature, feels-like temperature, humidity, wind speed, and gust speed. For example:
tempEl.innerHTML = temp ? `${temp}° C` : 'N/A';The expected-value helper repeats the same mistake:
"main-temperature": wobj.main.temp || "N/A",Returning
0for all five measurements producesN/A,Feels Like: N/A,Humidity: N/A,Wind: N/A, andGusts: N/A. The user story reservesN/Aforundefinedvalues. The existing city fixtures do not cover zero measurements, and the helper would expectN/Afor them.
Affected Pages
Expected behavior
-
Both supplied solutions should handle missing weather data without rejecting. The error case should display exactly one alert with
Something went wrong, please try again laterand should not update the weather display. The tests should await the asynchronous operation, fail on rejection, verify the alert and unchanged display, and restore temporary replacements after the operation finishes. -
Both solutions and their expected-value helpers should preserve valid zero measurements and use
N/Aforundefinedvalues. The tests should include zero-valued measurements and verify that all five corresponding elements display zero with any applicable units or labels, while retaining coverage for missing values.
Activity
27-amu commentedon Nov 1, 2026
I'd like to work on this issue! I'll update both lab challenge files to properly handle zero measurements (avoiding falsey checks) and ensure missing data and error states are correctly handled without unhandled promise rejections.
majestic-owl448 commentedon Nov 1, 2026
@27-amu We typically do not assign issues. Instead, we accept the first pull request that comprehensively solves the issue.
Issues labeled with
help wantedorfirst timers onlyare open for contributions.Please make sure you read our guidelines for contributing. We prioritize contributors following the instructions in our guide. Join us in our chat room or the forum if you need help contributing - our community will be happy to assist you.