mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-04-26 15:52:23 +00:00
Since the project's inception, I've missed a clear separation between default and third-party modules. This increases complexity within the project (exclude `modules`, but not `modules/default`), but the mixed use is particularly problematic in Docker setups. Therefore, with this pull request, I'm moving the default modules to a different directory. ~~I've chosen `default/modules`, but I'm not bothered about it; `defaultmodules` or something similar would work just as well.~~ Changed to `defaultmodules`. Let me know if there's a majority in favor of this change.
16 lines
580 B
JavaScript
16 lines
580 B
JavaScript
const fs = require("node:fs");
|
|
const path = require("node:path");
|
|
const defaults = require("../../../js/defaults");
|
|
|
|
const root_path = path.join(__dirname, "../../..");
|
|
|
|
describe("Default modules set in defaultmodules/defaultmodules.js", () => {
|
|
const expectedDefaultModules = require(`${root_path}/${defaults.defaultModulesDir}/defaultmodules`);
|
|
|
|
for (const defaultModule of expectedDefaultModules) {
|
|
it(`contains a folder for defaultmodules/${defaultModule}"`, () => {
|
|
expect(fs.existsSync(path.join(root_path, "defaultmodules", defaultModule))).toBe(true);
|
|
});
|
|
}
|
|
});
|