UNPKG

1.26 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6exports.default = getNoTestFoundRelatedToChangedFiles;
7
8function _chalk() {
9 const data = _interopRequireDefault(require('chalk'));
10
11 _chalk = function () {
12 return data;
13 };
14
15 return data;
16}
17
18function _jestUtil() {
19 const data = require('jest-util');
20
21 _jestUtil = function () {
22 return data;
23 };
24
25 return data;
26}
27
28function _interopRequireDefault(obj) {
29 return obj && obj.__esModule ? obj : {default: obj};
30}
31
32/**
33 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
34 *
35 * This source code is licensed under the MIT license found in the
36 * LICENSE file in the root directory of this source tree.
37 */
38function getNoTestFoundRelatedToChangedFiles(globalConfig) {
39 const ref = globalConfig.changedSince
40 ? `"${globalConfig.changedSince}"`
41 : 'last commit';
42
43 let msg = _chalk().default.bold(
44 `No tests found related to files changed since ${ref}.`
45 );
46
47 if (_jestUtil().isInteractive) {
48 msg += _chalk().default.dim(
49 '\n' +
50 (globalConfig.watch
51 ? 'Press `a` to run all tests, or run Jest with `--watchAll`.'
52 : 'Run Jest without `-o` or with `--all` to run all tests.')
53 );
54 }
55
56 return msg;
57}