Skip to content

Commit

Permalink
Revert "feat: transform file paths into hyperlinks (#8980)"
Browse files Browse the repository at this point in the history
This reverts commit 01fd3a4.
  • Loading branch information
thymikee committed May 2, 2020
1 parent c6b19a4 commit 53d93fa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 65 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@

- `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129))
- `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943))
- `[jest-reporters]` Revert: Transform file paths into hyperlinks ([#9294](https://github.com/facebook/jest/pull/9294))

### Chore & Maintenance

Expand Down
1 change: 0 additions & 1 deletion packages/jest-reporters/package.json
Expand Up @@ -27,7 +27,6 @@
"slash": "^3.0.0",
"source-map": "^0.6.0",
"string-length": "^3.1.0",
"terminal-link": "^2.0.0",
"v8-to-istanbul": "^4.1.3"
},
"devDependencies": {
Expand Down
38 changes: 0 additions & 38 deletions packages/jest-reporters/src/__tests__/get_result_header.test.js

This file was deleted.

14 changes: 4 additions & 10 deletions packages/jest-reporters/src/get_result_header.ts
Expand Up @@ -9,7 +9,6 @@ import type {Config} from '@jest/types';
import type {TestResult} from '@jest/test-result';
import chalk = require('chalk');
import {formatTestPath, printDisplayName} from './utils';
import terminalLink = require('terminal-link');

const LONG_TEST_COLOR = chalk.reset.bold.bgRed;
// Explicitly reset for these messages since they can get written out in the
Expand All @@ -31,13 +30,6 @@ export default (
projectConfig?: Config.ProjectConfig,
): string => {
const testPath = result.testFilePath;
const formattedTestPath = formatTestPath(
projectConfig ? projectConfig : globalConfig,
testPath,
);
const fileLink = terminalLink(formattedTestPath, `file://${testPath}`, {
fallback: () => formattedTestPath,
});
const status =
result.numFailingTests > 0 || result.testExecError ? FAIL : PASS;

Expand All @@ -61,7 +53,9 @@ export default (
: '';

return (
`${status} ${projectDisplayName}${fileLink}` +
(testDetail.length ? ` (${testDetail.join(', ')})` : '')
`${status} ${projectDisplayName}${formatTestPath(
projectConfig ? projectConfig : globalConfig,
testPath,
)}` + (testDetail.length ? ` (${testDetail.join(', ')})` : '')
);
};
16 changes: 0 additions & 16 deletions yarn.lock
Expand Up @@ -12794,14 +12794,6 @@ supports-color@^7.0.0, supports-color@^7.1.0:
dependencies:
has-flag "^4.0.0"

supports-hyperlinks@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47"
integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
dependencies:
has-flag "^4.0.0"
supports-color "^7.0.0"

svgo@^1.0.0, svgo@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167"
Expand Down Expand Up @@ -12933,14 +12925,6 @@ tempy@~0.3.0:
type-fest "^0.3.1"
unique-string "^1.0.0"

terminal-link@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994"
integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==
dependencies:
ansi-escapes "^4.2.1"
supports-hyperlinks "^2.0.0"

test-exclude@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e"
Expand Down

0 comments on commit 53d93fa

Please sign in to comment.