UNPKG

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