Socket
Socket
Sign inDemoInstall

@jest/core

Package Overview
Dependencies
286
Maintainers
6
Versions
142
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 28.0.0-alpha.5 to 28.0.0-alpha.6

8

build/FailedTestsInteractiveMode.js

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

return `${_chalk().default.dim(
ARROW + 'Press'
`${ARROW}Press`
)} ${key} ${_chalk().default.dim(description)}`;

@@ -163,3 +163,3 @@ }

this._pipe.write(messages.join('\n') + '\n');
this._pipe.write(`${messages.join('\n')}\n`);
}

@@ -177,3 +177,3 @@

const skippedText = _chalk().default.bold.yellow(
(0, _jestUtil().pluralize)('test', this._skippedNum) + ' skipped'
`${(0, _jestUtil().pluralize)('test', this._skippedNum)} skipped`
);

@@ -206,3 +206,3 @@

const skippedText = _chalk().default.bold.yellow(
(0, _jestUtil().pluralize)('test', this._skippedNum) + ' skipped'
`${(0, _jestUtil().pluralize)('test', this._skippedNum)} skipped`
);

@@ -209,0 +209,0 @@

@@ -49,4 +49,3 @@ 'use strict';

return (
_chalk().default.bold('No tests found, exiting with code 0') +
'\n' +
`${_chalk().default.bold('No tests found, exiting with code 0')}\n` +
`In ${_chalk().default.bold(globalConfig.rootDir)}` +

@@ -60,4 +59,3 @@ '\n' +

)}. Run with \`--verbose\` for more details.` +
'\n' +
dataMessage
`\n${dataMessage}`
);

@@ -67,4 +65,3 @@ }

return (
_chalk().default.bold('No tests found, exiting with code 1') +
'\n' +
`${_chalk().default.bold('No tests found, exiting with code 1')}\n` +
'Run with `--passWithNoTests` to exit with code 0' +

@@ -80,5 +77,4 @@ '\n' +

)}. Run with \`--verbose\` for more details.` +
'\n' +
dataMessage
`\n${dataMessage}`
);
}

@@ -43,6 +43,7 @@ 'use strict';

msg += _chalk().default.dim(
'\n' +
(globalConfig.watch
`\n${
globalConfig.watch
? 'Press `f` to quit "only failed tests" mode.'
: 'Run Jest without `--onlyFailures` or with `--all` to run all tests.')
: 'Run Jest without `--onlyFailures` or with `--all` to run all tests.'
}`
);

@@ -49,0 +50,0 @@ }

@@ -49,6 +49,7 @@ 'use strict';

msg += _chalk().default.dim(
'\n' +
(globalConfig.watch
`\n${
globalConfig.watch
? 'Press `a` to run all tests, or run Jest with `--watchAll`.'
: 'Run Jest without `-o` or with `--all` to run all tests.')
: 'Run Jest without `-o` or with `--all` to run all tests.'
}`
);

@@ -55,0 +56,0 @@ }

@@ -66,4 +66,3 @@ 'use strict';

's'
)} checked.\n` +
statsMessage
)} checked.\n${statsMessage}`
: `No files found in ${config.rootDir}.\n` +

@@ -88,20 +87,12 @@ "Make sure Jest's configuration does not exclude this directory." +

if (willExitWith0) {
return (
_chalk().default.bold('No tests found, exiting with code 0') +
'\n' +
individualResults.join('\n') +
'\n' +
dataMessage
);
return `${_chalk().default.bold(
'No tests found, exiting with code 0'
)}\n${individualResults.join('\n')}\n${dataMessage}`;
}
return (
_chalk().default.bold('No tests found, exiting with code 1') +
'\n' +
`${_chalk().default.bold('No tests found, exiting with code 1')}\n` +
'Run with `--passWithNoTests` to exit with code 0' +
'\n' +
individualResults.join('\n') +
'\n' +
dataMessage
`\n${individualResults.join('\n')}\n${dataMessage}`
);
}

@@ -35,7 +35,7 @@ 'use strict';

? _chalk().default.dim('filename ') +
_chalk().default.yellow('/' + testPathPattern + '/')
_chalk().default.yellow(`/${testPathPattern}/`)
: null,
testNamePattern
? _chalk().default.dim('test name ') +
_chalk().default.yellow('/' + testNamePattern + '/')
_chalk().default.yellow(`/${testNamePattern}/`)
: null

@@ -46,3 +46,3 @@ ]

const messages = [
'\n' + _chalk().default.bold('Active Filters: ') + filters
`\n${_chalk().default.bold('Active Filters: ')}${filters}`
];

@@ -49,0 +49,0 @@ return messages.filter(message => !!message).join(delimiter);

@@ -43,8 +43,8 @@ 'use strict';

_chalk().default.red('There are deprecation warnings.\n'),
_chalk().default.dim(' \u203A Press ') +
'Enter' +
_chalk().default.dim(' to continue.'),
_chalk().default.dim(' \u203A Press ') +
'Esc' +
_chalk().default.dim(' to exit.')
`${_chalk().default.dim(' \u203A Press ')}Enter${_chalk().default.dim(
' to continue.'
)}`,
`${_chalk().default.dim(' \u203A Press ')}Esc${_chalk().default.dim(
' to exit.'
)}`
];

@@ -51,0 +51,0 @@ pipe.write(messages.join('\n'));

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

};
outputStream.write(JSON.stringify(output, null, ' ') + '\n');
outputStream.write(`${JSON.stringify(output, null, ' ')}\n`);
}

@@ -274,6 +274,5 @@ 'use strict';

process.stderr.write(
'\n' +
_chalk().default.bold('--watch') +
' is not supported without git/hg, please use --watchAll ' +
'\n'
`\n${_chalk().default.bold(
'--watch'
)} is not supported without git/hg, please use --watchAll\n`
);

@@ -280,0 +279,0 @@ (0, _exit().default)(1);

@@ -95,40 +95,36 @@ 'use strict';

let stats = _chalk().default.bold.dim(
(0, _jestUtil().pluralize)('snapshot', numRemaining) + ' remaining'
`${(0, _jestUtil().pluralize)('snapshot', numRemaining)} remaining`
);
if (numPass) {
stats +=
', ' +
_chalk().default.bold.green(
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
);
stats += `, ${_chalk().default.bold.green(
`${(0, _jestUtil().pluralize)('snapshot', numPass)} updated`
)}`;
}
if (this._skippedNum) {
stats +=
', ' +
_chalk().default.bold.yellow(
(0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped'
);
stats += `, ${_chalk().default.bold.yellow(
`${(0, _jestUtil().pluralize)('snapshot', this._skippedNum)} skipped`
)}`;
}
const messages = [
'\n' + _chalk().default.bold('Interactive Snapshot Progress'),
`\n${_chalk().default.bold('Interactive Snapshot Progress')}`,
ARROW + stats,
'\n' + _chalk().default.bold('Watch Usage'),
_chalk().default.dim(ARROW + 'Press ') +
'u' +
_chalk().default.dim(' to update failing snapshots for this test.'),
_chalk().default.dim(ARROW + 'Press ') +
's' +
_chalk().default.dim(' to skip the current test.'),
_chalk().default.dim(ARROW + 'Press ') +
'q' +
_chalk().default.dim(' to quit Interactive Snapshot Mode.'),
_chalk().default.dim(ARROW + 'Press ') +
'Enter' +
_chalk().default.dim(' to trigger a test run.')
`\n${_chalk().default.bold('Watch Usage')}`,
`${_chalk().default.dim(`${ARROW}Press `)}u${_chalk().default.dim(
' to update failing snapshots for this test.'
)}`,
`${_chalk().default.dim(`${ARROW}Press `)}s${_chalk().default.dim(
' to skip the current test.'
)}`,
`${_chalk().default.dim(`${ARROW}Press `)}q${_chalk().default.dim(
' to quit Interactive Snapshot Mode.'
)}`,
`${_chalk().default.dim(`${ARROW}Press `)}Enter${_chalk().default.dim(
' to trigger a test run.'
)}`
];
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
this._pipe.write(`${messages.filter(Boolean).join('\n')}\n`);
}

@@ -142,34 +138,30 @@

let stats = _chalk().default.bold.dim(
(0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed'
`${(0, _jestUtil().pluralize)('snapshot', this._countPaths)} reviewed`
);
if (numPass) {
stats +=
', ' +
_chalk().default.bold.green(
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
);
stats += `, ${_chalk().default.bold.green(
`${(0, _jestUtil().pluralize)('snapshot', numPass)} updated`
)}`;
}
if (this._skippedNum) {
stats +=
', ' +
_chalk().default.bold.yellow(
(0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped'
);
stats += `, ${_chalk().default.bold.yellow(
`${(0, _jestUtil().pluralize)('snapshot', this._skippedNum)} skipped`
)}`;
}
const messages = [
'\n' + _chalk().default.bold('Interactive Snapshot Result'),
`\n${_chalk().default.bold('Interactive Snapshot Result')}`,
ARROW + stats,
'\n' + _chalk().default.bold('Watch Usage'),
_chalk().default.dim(ARROW + 'Press ') +
'r' +
_chalk().default.dim(' to restart Interactive Snapshot Mode.'),
_chalk().default.dim(ARROW + 'Press ') +
'q' +
_chalk().default.dim(' to quit Interactive Snapshot Mode.')
`\n${_chalk().default.bold('Watch Usage')}`,
`${_chalk().default.dim(`${ARROW}Press `)}r${_chalk().default.dim(
' to restart Interactive Snapshot Mode.'
)}`,
`${_chalk().default.dim(`${ARROW}Press `)}q${_chalk().default.dim(
' to quit Interactive Snapshot Mode.'
)}`
];
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
this._pipe.write(`${messages.filter(Boolean).join('\n')}\n`);
}

@@ -183,23 +175,21 @@

let stats = _chalk().default.bold.dim(
(0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed'
`${(0, _jestUtil().pluralize)('snapshot', this._countPaths)} reviewed`
);
if (numPass) {
stats +=
', ' +
_chalk().default.bold.green(
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
);
stats += `, ${_chalk().default.bold.green(
`${(0, _jestUtil().pluralize)('snapshot', numPass)} updated`
)}`;
}
const messages = [
'\n' + _chalk().default.bold('Interactive Snapshot Result'),
`\n${_chalk().default.bold('Interactive Snapshot Result')}`,
ARROW + stats,
'\n' + _chalk().default.bold('Watch Usage'),
_chalk().default.dim(ARROW + 'Press ') +
'Enter' +
_chalk().default.dim(' to return to watch mode.')
`\n${_chalk().default.bold('Watch Usage')}`,
`${_chalk().default.dim(`${ARROW}Press `)}Enter${_chalk().default.dim(
' to return to watch mode.'
)}`
];
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
this._pipe.write(`${messages.filter(Boolean).join('\n')}\n`);
}

@@ -206,0 +196,0 @@

@@ -172,4 +172,5 @@ 'use strict';

const message =
_chalk().default.red.bold('EXPERIMENTAL FEATURE!\n') +
'Your test suite is leaking memory. Please ensure all references are cleaned.\n' +
`${_chalk().default.red.bold(
'EXPERIMENTAL FEATURE!\n'
)}Your test suite is leaking memory. Please ensure all references are cleaned.\n` +
'\n' +

@@ -485,7 +486,5 @@ 'There is a number of things that can leak memory:\n' +

} catch (error) {
error.message =
'An error occurred while adding the reporter at path "' +
_chalk().default.bold(path) +
'".' +
error.message;
error.message = `An error occurred while adding the reporter at path "${_chalk().default.bold(
path
)}".${error.message}`;
throw error;

@@ -492,0 +491,0 @@ }

@@ -496,6 +496,9 @@ 'use strict';

console.error(
'\n\n' +
(0, _jestMessageUtil().formatExecError)(error, contexts[0].config, {
`\n\n${(0, _jestMessageUtil().formatExecError)(
error,
contexts[0].config,
{
noStackTrace: false
})
}
)}`
)

@@ -722,19 +725,19 @@ );

globalConfig.testPathPattern || globalConfig.testNamePattern
? _chalk().default.dim(' \u203A Press ') +
'c' +
_chalk().default.dim(' to clear filters.')
? `${_chalk().default.dim(' \u203A Press ')}c${_chalk().default.dim(
' to clear filters.'
)}`
: null,
'\n' + _chalk().default.bold('Watch Usage'),
`\n${_chalk().default.bold('Watch Usage')}`,
globalConfig.watch
? _chalk().default.dim(' \u203A Press ') +
'a' +
_chalk().default.dim(' to run all tests.')
? `${_chalk().default.dim(' \u203A Press ')}a${_chalk().default.dim(
' to run all tests.'
)}`
: null,
globalConfig.onlyFailures
? _chalk().default.dim(' \u203A Press ') +
'f' +
_chalk().default.dim(' to quit "only failed tests" mode.')
: _chalk().default.dim(' \u203A Press ') +
'f' +
_chalk().default.dim(' to run only failed tests.'),
? `${_chalk().default.dim(' \u203A Press ')}f${_chalk().default.dim(
' to quit "only failed tests" mode.'
)}`
: `${_chalk().default.dim(' \u203A Press ')}f${_chalk().default.dim(
' to run only failed tests.'
)}`,
(globalConfig.watchAll ||

@@ -744,5 +747,5 @@ globalConfig.testPathPattern ||

!globalConfig.noSCM
? _chalk().default.dim(' \u203A Press ') +
'o' +
_chalk().default.dim(' to only run tests related to changed files.')
? `${_chalk().default.dim(' \u203A Press ')}o${_chalk().default.dim(
' to only run tests related to changed files.'
)}`
: null,

@@ -754,13 +757,11 @@ ...(0, _watchPluginsHelpers.getSortedUsageRows)(

plugin =>
_chalk().default.dim(' \u203A Press') +
' ' +
plugin.key +
' ' +
_chalk().default.dim(`to ${plugin.prompt}.`)
`${_chalk().default.dim(' \u203A Press')} ${
plugin.key
} ${_chalk().default.dim(`to ${plugin.prompt}.`)}`
),
_chalk().default.dim(' \u203A Press ') +
'Enter' +
_chalk().default.dim(' to trigger a test run.')
`${_chalk().default.dim(' \u203A Press ')}Enter${_chalk().default.dim(
' to trigger a test run.'
)}`
];
return messages.filter(message => !!message).join(delimiter) + '\n';
return `${messages.filter(message => !!message).join(delimiter)}\n`;
};

@@ -770,5 +771,4 @@

'\n' +
_chalk().default.bold('Watch Usage: ') +
_chalk().default.dim('Press ') +
'w' +
_chalk().default.dim(' to show more.');
`${_chalk().default.bold('Watch Usage: ')}${_chalk().default.dim(
'Press '
)}w${_chalk().default.dim(' to show more.')}`;
{
"name": "@jest/core",
"description": "Delightful JavaScript Testing.",
"version": "28.0.0-alpha.5",
"version": "28.0.0-alpha.6",
"main": "./build/index.js",

@@ -15,7 +15,7 @@ "types": "./build/index.d.ts",

"dependencies": {
"@jest/console": "^28.0.0-alpha.5",
"@jest/reporters": "^28.0.0-alpha.5",
"@jest/test-result": "^28.0.0-alpha.5",
"@jest/transform": "^28.0.0-alpha.5",
"@jest/types": "^28.0.0-alpha.5",
"@jest/console": "^28.0.0-alpha.6",
"@jest/reporters": "^28.0.0-alpha.6",
"@jest/test-result": "^28.0.0-alpha.6",
"@jest/transform": "^28.0.0-alpha.6",
"@jest/types": "^28.0.0-alpha.6",
"@types/node": "*",

@@ -28,16 +28,16 @@ "ansi-escapes": "^4.2.1",

"jest-changed-files": "^28.0.0-alpha.3",
"jest-config": "^28.0.0-alpha.5",
"jest-haste-map": "^28.0.0-alpha.5",
"jest-message-util": "^28.0.0-alpha.5",
"jest-regex-util": "^28.0.0-alpha.3",
"jest-resolve": "^28.0.0-alpha.5",
"jest-resolve-dependencies": "^28.0.0-alpha.5",
"jest-runner": "^28.0.0-alpha.5",
"jest-runtime": "^28.0.0-alpha.5",
"jest-snapshot": "^28.0.0-alpha.5",
"jest-util": "^28.0.0-alpha.5",
"jest-validate": "^28.0.0-alpha.5",
"jest-watcher": "^28.0.0-alpha.5",
"jest-config": "^28.0.0-alpha.6",
"jest-haste-map": "^28.0.0-alpha.6",
"jest-message-util": "^28.0.0-alpha.6",
"jest-regex-util": "^28.0.0-alpha.6",
"jest-resolve": "^28.0.0-alpha.6",
"jest-resolve-dependencies": "^28.0.0-alpha.6",
"jest-runner": "^28.0.0-alpha.6",
"jest-runtime": "^28.0.0-alpha.6",
"jest-snapshot": "^28.0.0-alpha.6",
"jest-util": "^28.0.0-alpha.6",
"jest-validate": "^28.0.0-alpha.6",
"jest-watcher": "^28.0.0-alpha.6",
"micromatch": "^4.0.4",
"pretty-format": "^28.0.0-alpha.5",
"pretty-format": "^28.0.0-alpha.6",
"rimraf": "^3.0.0",

@@ -48,4 +48,4 @@ "slash": "^3.0.0",

"devDependencies": {
"@jest/test-sequencer": "^28.0.0-alpha.5",
"@jest/test-utils": "^28.0.0-alpha.5",
"@jest/test-sequencer": "^28.0.0-alpha.6",
"@jest/test-utils": "^28.0.0-alpha.6",
"@types/exit": "^0.1.30",

@@ -106,3 +106,3 @@ "@types/graceful-fs": "^4.1.2",

},
"gitHead": "46fb19b2628bd87676c10730ba19592c30b05478"
"gitHead": "6284ada4adb7008f5f8673b1a7b1c789d2e508fb"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc