From ead26f844004b385a00bc74e7171d937e16314cc Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 10 Nov 2019 19:03:54 +0100 Subject: [PATCH] feat(reporters): export utils for path formatting --- CHANGELOG.md | 1 + packages/jest-reporters/src/index.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4dfe2310be9..0a516030235a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - `[@jest/fake-timers]` Add Lolex as implementation of fake timers ([#8897](https://github.com/facebook/jest/pull/8897)) - `[jest-get-type]` Add `BigInt` support. ([#8382](https://github.com/facebook/jest/pull/8382)) - `[jest-matcher-utils]` Add `BigInt` support to `ensureNumbers` `ensureActualIsNumber`, `ensureExpectedIsNumber` ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[jest-reporters]` Export utils for path formatting ([#9162](https://github.com/facebook/jest/pull/9162)) - `[jest-runner]` Warn if a worker had to be force exited ([#8206](https://github.com/facebook/jest/pull/8206)) - `[jest-snapshot]` Display change counts in annotation lines ([#8982](https://github.com/facebook/jest/pull/8982)) - `[jest-snapshot]` [**BREAKING**] Improve report when the matcher has properties ([#9104](https://github.com/facebook/jest/pull/9104)) diff --git a/packages/jest-reporters/src/index.ts b/packages/jest-reporters/src/index.ts index c13bc91ceb4e..92f779fc5330 100644 --- a/packages/jest-reporters/src/index.ts +++ b/packages/jest-reporters/src/index.ts @@ -5,6 +5,13 @@ * LICENSE file in the root directory of this source tree. */ +import { + formatTestPath, + printDisplayName, + relativePath, + trimAndFormatPath, +} from './utils'; + export {Config} from '@jest/types'; export {AggregatedResult, SnapshotSummary, TestResult} from '@jest/test-result'; export {default as BaseReporter} from './base_reporter'; @@ -14,3 +21,9 @@ export {default as NotifyReporter} from './notify_reporter'; export {default as SummaryReporter} from './summary_reporter'; export {default as VerboseReporter} from './verbose_reporter'; export {Reporter, ReporterOnStartOptions, SummaryOptions, Test} from './types'; +export const utils = { + formatTestPath, + printDisplayName, + relativePath, + trimAndFormatPath, +};