Skip to content

Commit

Permalink
use pluralize
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed May 4, 2018
1 parent dd71548 commit 90c44b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/jest-cli/src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import runJest from '../run_jest';
import Runtime from 'jest-runtime';
import TestWatcher from '../test_watcher';
import watch from '../watch';
import pluralize from '../pluralize';
import yargs from 'yargs';
import rimraf from 'rimraf';
import {sync as realpath} from 'realpath-native';
Expand Down Expand Up @@ -131,10 +132,12 @@ export const runCLI = async (
})
.join('\n\n');

const openHandles = pluralize('open handle', openHandles.length, 's');

const message =
chalk.red(
'\nJest has detected the following ' +
`${openHandles.length} open handles potentially keeping Jest from ` +
`${openHandles} potentially keeping Jest from ` +
'exiting:\n\n',
) + handles;

Expand Down

0 comments on commit 90c44b0

Please sign in to comment.