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 81fe06e commit 1e73b56
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 66 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765))
- `[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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {TestResult} from '@jest/test-result';
import chalk = require('chalk');
import {formatTime} from 'jest-util';
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 @@ -32,13 +31,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 @@ -62,7 +54,9 @@ export default (
: '';

return (
`${status} ${projectDisplayName}${fileLink}` +
(testDetail.length ? ` (${testDetail.join(', ')})` : '')
`${status} ${projectDisplayName}${formatTestPath(
projectConfig || globalConfig,
testPath,
)}` + (testDetail.length ? ` (${testDetail.join(', ')})` : '')
);
};
19 changes: 2 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4938,20 +4938,13 @@ cssom@~0.3.6:
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==

cssstyle@^2.0.0:
cssstyle@^2.0.0, cssstyle@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852"
integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==
dependencies:
cssom "~0.3.6"

cssstyle@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992"
integrity sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA==
dependencies:
cssom "~0.3.6"

csstype@^2.2.0:
version "2.6.10"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b"
Expand Down Expand Up @@ -13023,22 +13016,14 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"

source-map-support@^0.5.16:
source-map-support@^0.5.16, source-map-support@^0.5.6:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-support@^0.5.6:
version "0.5.13"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
Expand Down

0 comments on commit 1e73b56

Please sign in to comment.