diff --git a/integration_tests/__tests__/clear_cache.test.js b/integration_tests/__tests__/clear_cache.test.js index 86c9c17e0801..a4190810e324 100644 --- a/integration_tests/__tests__/clear_cache.test.js +++ b/integration_tests/__tests__/clear_cache.test.js @@ -13,13 +13,9 @@ const fs = require('fs'); const os = require('os'); const path = require('path'); const runJest = require('../runJest'); -const skipOnWindows = require('../../scripts/skip_on_windows'); -const rimraf = require('rimraf'); const CACHE = path.resolve(os.tmpdir(), 'clear_cache_directory'); -skipOnWindows.suite(); - describe('jest --clearCache', () => { test('normal run results in cache directory being written', () => { const {status} = runJest('clear_cache', [`--cacheDirectory=${CACHE}`]); diff --git a/packages/jest-cli/src/cli/args.js b/packages/jest-cli/src/cli/args.js index 4e8308d742fb..018b7cbd619d 100644 --- a/packages/jest-cli/src/cli/args.js +++ b/packages/jest-cli/src/cli/args.js @@ -120,7 +120,7 @@ export const options = { clearCache: { default: undefined, description: - 'Clears the configured Jest cache directory and then exits.' + + 'Clears the configured Jest cache directory and then exits. ' + 'Default directory can be found by calling jest --showConfig', type: 'boolean', }, diff --git a/packages/jest-cli/src/cli/index.js b/packages/jest-cli/src/cli/index.js index fea62456cb38..752fbeb8cf04 100644 --- a/packages/jest-cli/src/cli/index.js +++ b/packages/jest-cli/src/cli/index.js @@ -70,7 +70,7 @@ export const runCLI = async ( ); if (argv.clearCache) { - configs.map(config => { + configs.forEach(config => { rimraf.sync(config.cacheDirectory); process.stdout.write(`Cleared ${config.cacheDirectory}\n`); });