mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Refactored the mock data generation for the tests so we can use plain JSON files for the data and read it in a more general way. Comments welcome! Co-authored-by: veeck <michael@veeck.de>
33 lines
993 B
JavaScript
33 lines
993 B
JavaScript
module.exports = async () => {
|
|
return {
|
|
verbose: true,
|
|
testTimeout: 20000,
|
|
testSequencer: "<rootDir>/tests/utils/test_sequencer.js",
|
|
projects: [
|
|
{
|
|
displayName: "unit",
|
|
moduleNameMapper: {
|
|
logger: "<rootDir>/js/logger.js"
|
|
},
|
|
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
|
|
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks"]
|
|
},
|
|
{
|
|
displayName: "electron",
|
|
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
|
|
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers/"]
|
|
},
|
|
{
|
|
displayName: "e2e",
|
|
setupFilesAfterEnv: ["<rootDir>/tests/e2e/helpers/mock-console.js"],
|
|
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
|
|
modulePaths: ["<rootDir>/js/"],
|
|
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers/", "<rootDir>/tests/e2e/mocks"]
|
|
}
|
|
],
|
|
collectCoverageFrom: ["./clientonly/**/*.js", "./js/**/*.js", "./modules/**/*.js", "./serveronly/**/*.js"],
|
|
coverageReporters: ["lcov", "text"],
|
|
coverageProvider: "v8"
|
|
};
|
|
};
|