Add spell check (#3544)

I felt like adding a spell checker, but it's okay if you find it
superfluous. At least then we could fix the found spell issues.

What is still missing is an automatic integration so that the spell
checker does not have to be called manually. Would it perhaps make sense
to always do it before a release?
This commit is contained in:
Kristjan ESPERANTO
2024-09-18 07:37:09 +02:00
committed by GitHub
parent ea3a323581
commit d9f9f41e98
17 changed files with 1338 additions and 46 deletions

View File

@@ -5,7 +5,7 @@ describe("AnimateCSS integration Test", () => {
let testConfigFile = "tests/configs/modules/compliments/compliments_animateCSS.js";
// define config file to fallback to default: wrong animation name (must return no animation)
let testConfigFileFallbackToDefault = "tests/configs/modules/compliments/compliments_animateCSS_fallbackToDefault.js";
// define config file with an inversed name animation : in for out and vice versa (must return no animation)
// define config file with an inverted name animation : in for out and vice versa (must return no animation)
let testConfigFileInvertedAnimationName = "tests/configs/modules/compliments/compliments_animateCSS_invertedAnimationName.js";
// define config file with no animation defined
let testConfigByDefault = "tests/configs/modules/compliments/compliments_anytime.js";

View File

@@ -53,8 +53,8 @@ describe("Weather module: Weather Hourly Forecast", () => {
});
describe("Shows precipitation probability", () => {
const propabilities = [undefined, undefined, "12 %", "36 %", "44 %"];
for (const [index, pop] of propabilities.entries()) {
const probabilities = [undefined, undefined, "12 %", "36 %", "44 %"];
for (const [index, pop] of probabilities.entries()) {
if (pop) {
it(`should render probability ${pop}`, async () => {
await expect(weatherFunc.getText(`.weather table.small tr:nth-child(${index + 1}) td.precipitation-prob`, pop)).resolves.toBe(true);

View File

@@ -12,7 +12,7 @@ describe("Display of modules", () => {
it("should show the test header", async () => {
const elem = await helpers.waitForElement("#module_0_helloworld .module-header");
expect(elem).not.toBeNull();
// textContent gibt hier lowercase zurück, das uppercase wird durch css realisiert, was daher nicht in textContent landet
// textContent returns lowercase here, the uppercase is realized by CSS, which therefore does not end up in textContent
expect(elem.textContent).toBe("test_header");
});

View File

@@ -7,7 +7,7 @@ describe("App environment", () => {
beforeAll(async () => {
process.env.MM_CONFIG_FILE = "tests/configs/default.js";
serverProcess = await require("node:child_process").spawn("npm", ["run", "server"], { env: process.env, detached: true });
// we have to wait until the server is startet
// we have to wait until the server is started
await delay(2000);
});
afterAll(async () => {

View File

@@ -51,7 +51,7 @@ describe("Compliments module", () => {
});
});
describe("Test all date events shown without neww property", () => {
describe("Test all date events shown without new property", () => {
it("shows 'any message' on May 6", async () => {
await helpers.startApplication("tests/configs/modules/compliments/compliments_specialDayUnique_false.js", "06 May 2022 10:00:00 GMT");
await expect(doTest(["Special day message", "Typical message 1", "Typical message 2", "Typical message 3"])).resolves.toBe(true);

View File

@@ -45,7 +45,7 @@ describe("server_functions tests", () => {
expect(fetchMock.mock.calls[0][0]).toBe(urlToCall);
});
it("Forewards Content-Type if json", async () => {
it("Forwards Content-Type if json", async () => {
fetchResponseHeadersGet.mockImplementation(() => "json");
await cors(request, corsResponse);
@@ -58,7 +58,7 @@ describe("server_functions tests", () => {
expect(corsResponse.set.mock.calls[0][1]).toBe("json");
});
it("Forewards Content-Type if xml", async () => {
it("Forwards Content-Type if xml", async () => {
fetchResponseHeadersGet.mockImplementation(() => "xml");
await cors(request, corsResponse);

View File

@@ -47,7 +47,7 @@ describe("Weather utils tests", () => {
expect(WeatherUtils.calculateFeelsLike(0, 20, 40)).toBe(-9.444444444444445);
});
it("should return a calculated feelsLike info (positiv value)", () => {
it("should return a calculated feelsLike info (positive value)", () => {
expect(WeatherUtils.calculateFeelsLike(30, 0, 60)).toBe(32.8320322777777);
});
});