Skip to content

Commit 3260b9d

Browse files
authored
add test for config:check (#3886)
1 parent 2481bc6 commit 3260b9d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Thanks to: @dathbe.
2424
- [clock] Add CSS to prevent line breaking of sunset/sunrise time display (#3816)
2525
- [core] Enhance system information logging format and include additional env and RAM details (#3839, #3843)
2626
- [refactor] Add new file `js/module_functions.js` to move code used in several modules to one place (#3837)
27-
- [refactor] Use global.root_path where possible (#3883, #3885)
27+
- [refactor] Use global.root_path where possible and add test for config:check (#3883, #3885, #3886)
2828
- [tests] refactor: simplify jest config file (#3844)
2929
- [tests] refactor: extract constants for weather electron tests (#3845)
3030
- [tests] refactor: add `setupDOMEnvironment` helper function to eliminate repetitive JSDOM setup code (#3860)

tests/e2e/serveronly_spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ describe("App environment", () => {
2424
expect(res.status).toBe(404);
2525
});
2626
});
27+
28+
describe("Check config", () => {
29+
it("config check should return without errors", async () => {
30+
process.env.MM_CONFIG_FILE = "tests/configs/default.js";
31+
const serverProcess = await require("node:child_process").spawnSync("node", ["--run", "config:check"], { env: process.env });
32+
expect(serverProcess.stderr.toString()).toBe("");
33+
});
34+
});

0 commit comments

Comments
 (0)