update jest config since 30.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs = require('fs');
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = results => {
|
||||
const allSkipped = results.testResults.every(result => {
|
||||
return result.skipped;
|
||||
});
|
||||
const allSkipped = results.testResults.every(result => result.skipped);
|
||||
if (allSkipped) {
|
||||
console.log('All tests were skipped!');
|
||||
// create an empty file to signal that all tests were skipped for CI
|
||||
fs.mkdirSync('./coverage', {recursive: true});
|
||||
fs.closeSync(fs.openSync('./coverage/allSkipped.txt', 'w'));
|
||||
}
|
||||
return results;
|
||||
@@ -26,6 +26,6 @@ module.exports = {
|
||||
moduleNameMapper: {
|
||||
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
||||
},
|
||||
testResultsProcessor: './__tests__/testResultsProcessor.ts',
|
||||
testResultsProcessor: '<rootDir>/__tests__/testResultsProcessor.js',
|
||||
verbose: false
|
||||
};
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs = require('fs');
|
||||
import os = require('os');
|
||||
import path = require('path');
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-'));
|
||||
|
||||
@@ -28,9 +29,7 @@ process.env = Object.assign({}, process.env, {
|
||||
GITHUB_RUN_NUMBER: 15,
|
||||
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
||||
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
||||
}) as {
|
||||
[key: string]: string;
|
||||
};
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
@@ -46,6 +45,6 @@ module.exports = {
|
||||
},
|
||||
collectCoverageFrom: ['src/**/{!(index.ts),}.ts'],
|
||||
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
|
||||
testResultsProcessor: './__tests__/testResultsProcessor.ts',
|
||||
testResultsProcessor: '<rootDir>/__tests__/testResultsProcessor.js',
|
||||
verbose: true
|
||||
};
|
||||
@@ -12,9 +12,9 @@
|
||||
"prettier:fix": "prettier --write \"./**/*.ts\"",
|
||||
"test": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:itg": "jest -c jest.config.itg.ts --runInBand --detectOpenHandles",
|
||||
"test:itg-list": "jest -c jest.config.itg.ts --listTests",
|
||||
"test:itg-coverage": "jest --coverage -c jest.config.itg.ts --runInBand --detectOpenHandles"
|
||||
"test:itg": "jest -c jest.config.itg.js --runInBand",
|
||||
"test:itg-list": "jest -c jest.config.itg.js --listTests",
|
||||
"test:itg-coverage": "jest -c jest.config.itg.js --coverage --runInBand"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user