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.
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
const aliasMapper = {
|
|
logger: "<rootDir>/js/logger.js"
|
|
};
|
|
|
|
const config = {
|
|
verbose: true,
|
|
testTimeout: 20000,
|
|
testSequencer: "<rootDir>/tests/utils/test_sequencer.js",
|
|
projects: [
|
|
{
|
|
displayName: "unit",
|
|
globalSetup: "<rootDir>/tests/unit/helpers/global-setup.js",
|
|
moduleNameMapper: aliasMapper,
|
|
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
|
|
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks", "<rootDir>/tests/unit/helpers"]
|
|
},
|
|
{
|
|
displayName: "electron",
|
|
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
|
|
moduleNameMapper: aliasMapper,
|
|
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers"]
|
|
},
|
|
{
|
|
displayName: "e2e",
|
|
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
|
|
modulePaths: ["<rootDir>/js/"],
|
|
moduleNameMapper: aliasMapper,
|
|
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers", "<rootDir>/tests/e2e/mocks"]
|
|
}
|
|
],
|
|
collectCoverageFrom: [
|
|
"<rootDir>/clientonly/**/*.js",
|
|
"<rootDir>/js/**/*.js",
|
|
"<rootDir>/defaultmodules/**/*.js",
|
|
"<rootDir>/serveronly/**/*.js"
|
|
],
|
|
coverageReporters: ["lcov", "text"],
|
|
coverageProvider: "v8"
|
|
};
|
|
|
|
module.exports = config;
|