Fix precipitation styles (#3041)

They weren't applied to wrong classnames, this PR fixes that and also
expands the weather util tests

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-02-18 18:24:11 +01:00
committed by GitHub
parent 81244d961e
commit fb22a76796
8 changed files with 40 additions and 19 deletions

View File

@@ -51,7 +51,15 @@ describe("WeatherObject", () => {
describe("WeatherUtils", () => {
it("should convert windspeed correctly from mps to beaufort", () => {
expect(Math.round(WeatherUtils.convertWind(5, "beaufort"))).toBe(3);
expect(Math.round(WeatherUtils.convertWind(42, "beaufort"))).toBe(12);
expect(Math.round(WeatherUtils.convertWind(300, "beaufort"))).toBe(12);
});
it("should convert windspeed correctly from mps to kmh", () => {
expect(Math.round(WeatherUtils.convertWind(11.75, "kmh"))).toBe(42);
});
it("should convert windspeed correctly from mps to knots", () => {
expect(Math.round(WeatherUtils.convertWind(10, "knots"))).toBe(19);
});
it("should convert windspeed correctly from mph to mps", () => {