mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
Some small cleanups with regards to jest - call jest directly (nyc is integrated in jest these days) - move jest config into seperate file so we dont clutter up the package.json - remove empty test file for newsletter-unit-tests - update dependencies that touch jest - try out v8 as coverageProvider Co-authored-by: veeck <michael@veeck.de>
33 lines
995 B
JavaScript
33 lines
995 B
JavaScript
module.exports = async () => {
|
|
return {
|
|
verbose: true,
|
|
testTimeout: 20000,
|
|
testSequencer: "<rootDir>/tests/configs/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"
|
|
};
|
|
};
|