mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
@@ -49,6 +49,11 @@ 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);
|
||||
});
|
||||
|
||||
it("should convert windspeed correctly from mph to mps", () => {
|
||||
expect(Math.round(WeatherUtils.convertWindToMetric(93.951324266285))).toBe(42);
|
||||
});
|
||||
@@ -64,4 +69,8 @@ describe("WeatherUtils", () => {
|
||||
it("should return a calculated feelsLike info", () => {
|
||||
expect(WeatherUtils.calculateFeelsLike(0, 20, 40)).toBe(-9.444444444444445);
|
||||
});
|
||||
|
||||
it("should return a calculated feelsLike info", () => {
|
||||
expect(WeatherUtils.calculateFeelsLike(30, 0, 60)).toBe(32.8320322777777);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user