Updating NPM dependencies
This commit is contained in:
12
node_modules/jest-jasmine2/build/setup_jest_globals.js
generated
vendored
12
node_modules/jest-jasmine2/build/setup_jest_globals.js
generated
vendored
@@ -19,9 +19,7 @@ var _jestSnapshot = require('jest-snapshot');
|
||||
// test execution and add them to the test result, potentially failing
|
||||
// a passing test.
|
||||
const addSuppressedErrors = result => {
|
||||
const _getState = (0, _expect.getState)(),
|
||||
suppressedErrors = _getState.suppressedErrors;
|
||||
|
||||
const {suppressedErrors} = (0, _expect.getState)();
|
||||
(0, _expect.setState)({
|
||||
suppressedErrors: []
|
||||
});
|
||||
@@ -62,7 +60,7 @@ const patchJasmine = () => {
|
||||
constructor(attr) {
|
||||
const resultCallback = attr.resultCallback;
|
||||
|
||||
attr.resultCallback = function(result) {
|
||||
attr.resultCallback = function (result) {
|
||||
addSuppressedErrors(result);
|
||||
addAssertionErrors(result);
|
||||
resultCallback.call(attr, result);
|
||||
@@ -95,8 +93,7 @@ var _default = ({config, globalConfig, localRequire, testPath}) => {
|
||||
(0, _jestSnapshot.addSerializer)(localRequire(path));
|
||||
});
|
||||
patchJasmine();
|
||||
const expand = globalConfig.expand,
|
||||
updateSnapshot = globalConfig.updateSnapshot;
|
||||
const {expand, updateSnapshot} = globalConfig;
|
||||
const snapshotResolver = (0, _jestSnapshot.buildSnapshotResolver)(config);
|
||||
const snapshotPath = snapshotResolver.resolveSnapshotPath(testPath);
|
||||
const snapshotState = new _jestSnapshot.SnapshotState(snapshotPath, {
|
||||
@@ -105,7 +102,8 @@ var _default = ({config, globalConfig, localRequire, testPath}) => {
|
||||
getPrettier: () =>
|
||||
config.prettierPath ? require(config.prettierPath) : null,
|
||||
updateSnapshot
|
||||
});
|
||||
}); // @ts-expect-error: snapshotState is a jest extension of `expect`
|
||||
|
||||
(0, _expect.setState)({
|
||||
snapshotState,
|
||||
testPath
|
||||
|
||||
Reference in New Issue
Block a user