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 58d5126
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 66 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.0.0",
"@babel/register": "^7.0.0",
"@jest/test-utils": "^25.1.0",
"@jest/test-utils": "^25.5.0",
"@types/babel__core": "^7.0.0",
"@types/babel__generator": "^7.0.0",
"@types/babel__template": "^7.0.0",
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 @@ -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 || 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 @@ -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 58d5126

Please sign in to comment.