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 Jan 23, 2020
1 parent 7817dcc commit 0909877
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 65 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## master

- `[jest-reporters]` Revert: Transform file paths into hyperlinks ([#9294](https://github.com/facebook/jest/pull/9294))

### Features

### Fixes
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 @@ -28,7 +28,6 @@
"slash": "^3.0.0",
"source-map": "^0.6.0",
"string-length": "^3.1.0",
"terminal-link": "^2.0.0",
"v8-to-istanbul": "^4.0.1"
},
"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 @@ -9,7 +9,6 @@ import {Config} from '@jest/types';
import {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,
) => {
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
Original file line number Diff line number Diff line change
Expand Up @@ -13627,14 +13627,6 @@ supports-color@^7.0.0, supports-color@^7.1.0:
dependencies:
has-flag "^4.0.0"

supports-hyperlinks@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.0.0.tgz#b1b94a159e9df00b0a554b2d5f0e0a89690334b0"
integrity sha512-bFhn0MQ8qefLyJ3K7PpHiPUTuTVPWw6RXfaMeV6xgJLXtBbszyboz1bvGTVv4R0YpQm2DqlXXn0fFHhxUHVE5w==
dependencies:
has-flag "^4.0.0"
supports-color "^7.0.0"

svgo@^1.0.0, svgo@^1.0.5:
version "1.3.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167"
Expand Down Expand Up @@ -13750,14 +13742,6 @@ tempfile@^2.0.0:
temp-dir "^1.0.0"
uuid "^3.0.1"

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"

terser-webpack-plugin@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c"
Expand Down

0 comments on commit 0909877

Please sign in to comment.