Skip to content

Commit

Permalink
changes per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tabrindle committed Oct 11, 2017
1 parent 613feca commit 82d01b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions integration_tests/__tests__/clear_cache.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`]);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/cli/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
});
Expand Down

0 comments on commit 82d01b3

Please sign in to comment.