Merge pull request #14109 from strapi/chore/add-coverage-script-in-the-admin-package-json

Add coverage script in the admin
This commit is contained in:
Simone 2022-08-22 15:45:38 +02:00 committed by GitHub
commit f4c6a953bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

View File

@ -7,4 +7,6 @@ module.exports = {
...baseConfig,
displayName: (pkg.strapi && pkg.strapi.name) || pkg.name,
roots: [__dirname],
collectCoverageFrom: ['<rootDir>/packages/core/admin/admin/**/*.js'],
coverageDirectory: '<rootDir>/packages/core/admin/coverage',
};

View File

@ -34,7 +34,8 @@
"test:front": "cross-env IS_EE=true jest --config ./jest.config.front.js",
"test:front:watch": "cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
"test:front:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js",
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
"test:front:ce:cov": "cross-env IS_EE=false jest --config ./jest.config.front.js --coverage"
},
"dependencies": {
"@babel/core": "7.18.10",

View File

@ -5,4 +5,6 @@ module.exports = {
...baseConfig,
displayName: (pkg.strapi && pkg.strapi.name) || pkg.name,
roots: [__dirname],
collectCoverageFrom: ['<rootDir>/packages/core/helper-plugin/lib/src/**/*.js'],
coverageDirectory: '<rootDir>/packages/core/helper-plugin/coverage',
};

View File

@ -34,7 +34,7 @@
"prepublishOnly": "npm run build",
"storybook": "start-storybook -p 6006",
"test:front": "jest --config ./jest.config.front.js",
"test:front:cov": "jest --config ./jest.config.front.js --coverage --collectCoverageFrom='<rootDir>/packages/core/helper-plugin/lib/src/**/*.js' --coverageDirectory='<rootDir>/packages/core/helper-plugin/coverage'",
"test:front:cov": "jest --config ./jest.config.front.js --coverage",
"test:front:watch": "jest --config ./jest.config.front.js --watchAll",
"watch": "yarn create:index && cross-env NODE_ENV=development webpack-cli -w"
},