Fix rounding in precipitation percentage (#3045)

Percentage should be always rounded so that we dont get something like
"47.0000000001 %"

Some small typo and naming fixes also while I am here

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-02-20 20:04:40 +01:00
committed by GitHub
parent 390e5d6490
commit 6d86ffade4
6 changed files with 21 additions and 19 deletions

View File

@@ -51,7 +51,7 @@ describe("Weather module: Weather Hourly Forecast", () => {
});
describe("Shows precipitation probability", () => {
const propabilities = [undefined, undefined, "12%", "36%", "44%"];
const propabilities = [undefined, undefined, "12 %", "36 %", "44 %"];
for (const [index, pop] of propabilities.entries()) {
if (pop) {
it(`should render probability ${pop}`, async () => {