mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
fix tests for core plugins
This commit is contained in:
30
scm-ui/scripts/jest-plugin.config.js
Normal file
30
scm-ui/scripts/jest-plugin.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const transformer = path.resolve(__dirname, "babelPluginTransformer.js");
|
||||
const rootDir = path.resolve(process.cwd());
|
||||
const packageJsonPath = path.join(rootDir, "package.json");
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(packageJsonPath, { encoding: "UTF-8" })
|
||||
);
|
||||
|
||||
const reportDirectory = path.join(rootDir, "target", "jest-reports");
|
||||
|
||||
module.exports = {
|
||||
rootDir,
|
||||
transform: { "^.+\\.js$": transformer },
|
||||
transformIgnorePatterns: [".*/node_modules/.*"],
|
||||
collectCoverage: true,
|
||||
coverageDirectory: path.join(reportDirectory, "coverage"),
|
||||
coveragePathIgnorePatterns: ["src/main/js/tests/.*"],
|
||||
reporters: [
|
||||
"default",
|
||||
[
|
||||
"jest-junit",
|
||||
{
|
||||
suiteName: packageJson.name + " tests",
|
||||
outputDirectory: reportDirectory,
|
||||
outputName: "TEST-plugin.xml"
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user