Socket
Socket
Sign inDemoInstall

@jest/reporters

Package Overview
Dependencies
Maintainers
6
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/reporters - npm Package Compare versions

Comparing version 28.0.3 to 28.1.0

build/formatTestPath.js

8

build/getResultHeader.js

@@ -38,4 +38,6 @@ 'use strict';

var _utils = require('./utils');
var _formatTestPath = _interopRequireDefault(require('./formatTestPath'));
var _printDisplayName = _interopRequireDefault(require('./printDisplayName'));
function _interopRequireDefault(obj) {

@@ -67,3 +69,3 @@ return obj && obj.__esModule ? obj : {default: obj};

const testPath = result.testFilePath;
const formattedTestPath = (0, _utils.formatTestPath)(
const formattedTestPath = (0, _formatTestPath.default)(
projectConfig ? projectConfig : globalConfig,

@@ -100,3 +102,3 @@ testPath

projectConfig && projectConfig.displayName
? `${(0, _utils.printDisplayName)(projectConfig)} `
? `${(0, _printDisplayName.default)(projectConfig)} `
: '';

@@ -103,0 +105,0 @@ return `${status} ${projectDisplayName}${fileLink}${

@@ -28,3 +28,3 @@ 'use strict';

var _utils = require('./utils');
var _formatTestPath = _interopRequireDefault(require('./formatTestPath'));

@@ -137,7 +137,10 @@ function _interopRequireDefault(obj) {

summary.push(
` ${DOWN_ARROW} ${DOT}${(0, _utils.formatTestPath)(globalConfig, head)}`
` ${DOWN_ARROW} ${DOT}${(0, _formatTestPath.default)(
globalConfig,
head
)}`
);
tail.forEach(key => {
summary.push(
` ${DOT}${(0, _utils.formatTestPath)(globalConfig, key)}`
` ${DOT}${(0, _formatTestPath.default)(globalConfig, key)}`
);

@@ -180,3 +183,3 @@ });

summary.push(
` ${DOWN_ARROW}${(0, _utils.formatTestPath)(
` ${DOWN_ARROW}${(0, _formatTestPath.default)(
globalConfig,

@@ -183,0 +186,0 @@ uncheckedFile.filePath

@@ -12,4 +12,2 @@ /**

import {Config} from '@jest/types';
import {GlobalConfig} from '@jest/types/build/Config';
import {ProjectConfig} from '@jest/types/build/Config';
import {SnapshotSummary} from '@jest/test-result';

@@ -110,2 +108,7 @@ import type {Suite} from '@jest/test-result';

declare function formatTestPath(
config: Config.GlobalConfig | Config.ProjectConfig,
testPath: string,
): string;
declare function getResultHeader(

@@ -128,2 +131,7 @@ result: TestResult,

declare function getSummary(
aggregatedResults: AggregatedResult,
options?: SummaryOptions,
): string;
export declare class GitHubActionsReporter extends BaseReporter {

@@ -146,2 +154,12 @@ static readonly filename: string;

declare function printDisplayName(config: Config.ProjectConfig): string;
declare function relativePath(
config: Config.GlobalConfig | Config.ProjectConfig,
testPath: string,
): {
basename: string;
dirname: string;
};
export declare interface Reporter {

@@ -227,28 +245,18 @@ readonly onTestResult?: (

declare function trimAndFormatPath(
pad: number,
config: Config.ProjectConfig | Config.GlobalConfig,
testPath: string,
columns: number,
): string;
export declare const utils: {
formatTestPath: (
config: ProjectConfig | GlobalConfig,
testPath: string,
) => string;
formatTestPath: typeof formatTestPath;
getResultHeader: typeof getResultHeader;
getSnapshotStatus: typeof getSnapshotStatus;
getSnapshotSummary: typeof getSnapshotSummary;
getSummary: (
aggregatedResults: AggregatedResult,
options?: SummaryOptions | undefined,
) => string;
printDisplayName: (config: ProjectConfig) => string;
relativePath: (
config: ProjectConfig | GlobalConfig,
testPath: string,
) => {
basename: string;
dirname: string;
};
trimAndFormatPath: (
pad: number,
config: ProjectConfig | GlobalConfig,
testPath: string,
columns: number,
) => string;
getSummary: typeof getSummary;
printDisplayName: typeof printDisplayName;
relativePath: typeof relativePath;
trimAndFormatPath: typeof trimAndFormatPath;
};

@@ -255,0 +263,0 @@

@@ -50,2 +50,4 @@ 'use strict';

var _formatTestPath = _interopRequireDefault(require('./formatTestPath'));
var _getResultHeader = _interopRequireDefault(require('./getResultHeader'));

@@ -59,4 +61,10 @@

var _utils = require('./utils');
var _getSummary = _interopRequireDefault(require('./getSummary'));
var _printDisplayName = _interopRequireDefault(require('./printDisplayName'));
var _relativePath = _interopRequireDefault(require('./relativePath'));
var _trimAndFormatPath = _interopRequireDefault(require('./trimAndFormatPath'));
var _BaseReporter = _interopRequireDefault(require('./BaseReporter'));

@@ -68,2 +76,6 @@

var _GitHubActionsReporter = _interopRequireDefault(
require('./GitHubActionsReporter')
);
var _NotifyReporter = _interopRequireDefault(require('./NotifyReporter'));

@@ -75,6 +87,2 @@

var _GitHubActionsReporter = _interopRequireDefault(
require('./GitHubActionsReporter')
);
function _interopRequireDefault(obj) {

@@ -91,11 +99,11 @@ return obj && obj.__esModule ? obj : {default: obj};

const utils = {
formatTestPath: _utils.formatTestPath,
formatTestPath: _formatTestPath.default,
getResultHeader: _getResultHeader.default,
getSnapshotStatus: _getSnapshotStatus.default,
getSnapshotSummary: _getSnapshotSummary.default,
getSummary: _utils.getSummary,
printDisplayName: _utils.printDisplayName,
relativePath: _utils.relativePath,
trimAndFormatPath: _utils.trimAndFormatPath
getSummary: _getSummary.default,
printDisplayName: _printDisplayName.default,
relativePath: _relativePath.default,
trimAndFormatPath: _trimAndFormatPath.default
};
exports.utils = utils;

@@ -28,4 +28,10 @@ 'use strict';

var _utils = require('./utils');
var _getSummary = _interopRequireDefault(require('./getSummary'));
var _printDisplayName = _interopRequireDefault(require('./printDisplayName'));
var _trimAndFormatPath = _interopRequireDefault(require('./trimAndFormatPath'));
var _wrapAnsiString = _interopRequireDefault(require('./wrapAnsiString'));
function _interopRequireDefault(obj) {

@@ -190,8 +196,8 @@ return obj && obj.__esModule ? obj : {default: obj};

const projectDisplayName = config.displayName
? `${(0, _utils.printDisplayName)(config)} `
? `${(0, _printDisplayName.default)(config)} `
: '';
const prefix = RUNNING + projectDisplayName;
content += `${(0, _utils.wrapAnsiString)(
content += `${(0, _wrapAnsiString.default)(
prefix +
(0, _utils.trimAndFormatPath)(
(0, _trimAndFormatPath.default)(
(0, _stringLength().default)(prefix),

@@ -208,3 +214,3 @@ config,

if (this._showStatus && this._aggregatedResults) {
content += `\n${(0, _utils.getSummary)(this._aggregatedResults, {
content += `\n${(0, _getSummary.default)(this._aggregatedResults, {
currentTestCases: this._currentTestCases,

@@ -211,0 +217,0 @@ estimatedTime: this._estimatedTime,

@@ -36,3 +36,3 @@ 'use strict';

var _utils = require('./utils');
var _getSummary = _interopRequireDefault(require('./getSummary'));

@@ -129,3 +129,3 @@ function _interopRequireDefault(obj) {

if (numTotalTestSuites) {
let message = (0, _utils.getSummary)(aggregatedResults, {
let message = (0, _getSummary.default)(aggregatedResults, {
estimatedTime: this._estimatedTime

@@ -132,0 +132,0 @@ });

{
"name": "@jest/reporters",
"description": "Jest's reporters",
"version": "28.0.3",
"version": "28.1.0",
"main": "./build/index.js",

@@ -16,6 +16,6 @@ "types": "./build/index.d.ts",

"@bcoe/v8-coverage": "^0.2.3",
"@jest/console": "^28.0.2",
"@jest/test-result": "^28.0.2",
"@jest/transform": "^28.0.3",
"@jest/types": "^28.0.2",
"@jest/console": "^28.1.0",
"@jest/test-result": "^28.1.0",
"@jest/transform": "^28.1.0",
"@jest/types": "^28.1.0",
"@jridgewell/trace-mapping": "^0.3.7",

@@ -33,6 +33,7 @@ "@types/node": "*",

"istanbul-reports": "^3.1.3",
"jest-util": "^28.0.2",
"jest-worker": "^28.0.2",
"jest-util": "^28.1.0",
"jest-worker": "^28.1.0",
"slash": "^3.0.0",
"string-length": "^4.0.1",
"strip-ansi": "^6.0.0",
"terminal-link": "^2.0.0",

@@ -42,3 +43,4 @@ "v8-to-istanbul": "^9.0.0"

"devDependencies": {
"@jest/test-utils": "^28.0.2",
"@jest/test-utils": "^28.1.0",
"@tsd/typescript": "~4.6.2",
"@types/exit": "^0.1.30",

@@ -53,5 +55,5 @@ "@types/glob": "^7.1.1",

"@types/node-notifier": "^8.0.0",
"jest-resolve": "^28.0.3",
"jest-resolve": "^28.1.0",
"mock-fs": "^5.1.2",
"strip-ansi": "^6.0.0"
"tsd-lite": "^0.5.1"
},

@@ -82,3 +84,3 @@ "peerDependencies": {

},
"gitHead": "1bea778422dc049b0fb3d7da809ffec39be549ff"
"gitHead": "f5db241312f46528389e55c38221e6b6968622cf"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc