mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-12 09:52:37 +00:00
Release 2.33.0 (#3903)
This commit is contained in:
committed by
GitHub
parent
62b0f7f26e
commit
b0c5924019
@@ -10,7 +10,7 @@ describe("Calendar fetcher utils test", () => {
|
||||
excludedEvents: [],
|
||||
includePastEvents: false,
|
||||
maximumEntries: 10,
|
||||
maximumNumberOfDays: 365
|
||||
maximumNumberOfDays: 367
|
||||
};
|
||||
|
||||
describe("filterEvents", () => {
|
||||
|
||||
@@ -2,10 +2,18 @@ const weather = require("../../../../../modules/default/weather/weatherutils");
|
||||
const WeatherUtils = require("../../../../../modules/default/weather/weatherutils");
|
||||
|
||||
describe("Weather utils tests", () => {
|
||||
describe("windspeed conversion to imperial", () => {
|
||||
describe("temperature conversion to imperial", () => {
|
||||
it("should convert temp correctly from Celsius to Celsius", () => {
|
||||
expect(Math.round(WeatherUtils.convertTemp(10, "metric"))).toBe(10);
|
||||
});
|
||||
|
||||
it("should convert temp correctly from Celsius to Fahrenheit", () => {
|
||||
expect(Math.round(WeatherUtils.convertTemp(10, "imperial"))).toBe(50);
|
||||
});
|
||||
|
||||
it("should convert temp correctly from Fahrenheit to Celsius", () => {
|
||||
expect(Math.round(WeatherUtils.convertTempToMetric(10))).toBe(-12);
|
||||
});
|
||||
});
|
||||
|
||||
describe("windspeed conversion to beaufort", () => {
|
||||
@@ -44,11 +52,11 @@ describe("Weather utils tests", () => {
|
||||
|
||||
describe("feelsLike calculation", () => {
|
||||
it("should return a calculated feelsLike info (negative value)", () => {
|
||||
expect(WeatherUtils.calculateFeelsLike(0, 20, 40)).toBe(-9.444444444444445);
|
||||
expect(WeatherUtils.calculateFeelsLike(0, 20, 40)).toBe(-9.397005931555448);
|
||||
});
|
||||
|
||||
it("should return a calculated feelsLike info (positive value)", () => {
|
||||
expect(WeatherUtils.calculateFeelsLike(30, 0, 60)).toBe(32.8320322777777);
|
||||
expect(WeatherUtils.calculateFeelsLike(30, 0, 60)).toBe(32.832032277777756);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user