{"size": 1509, "ext": "js", "max_stars_repo_path": "node_modules/jest-enzyme/lib/index.js", "max_stars_repo_name": "ajraymond94/react-redux-jest-testing", "max_stars_repo_stars_event_min_datetime": "2021-07-25T06:58:04.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-25T06:58:04.000Z", "max_issues_repo_path": "node_modules/jest-enzyme/lib/index.js", "max_issues_repo_name": "Aishwaryaofficial/WeatherApplication", "max_issues_repo_issues_event_min_datetime": "2020-01-10T02:25:08.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T21:33:44.000Z", "max_forks_repo_path": "node_modules/jest-enzyme/lib/index.js", "max_forks_repo_name": "Aishwaryaofficial/WeatherApplication", "max_forks_repo_forks_event_min_datetime": "2019-12-19T03:51:33.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-19T03:51:33.000Z"}
{"max_stars_count": 1, "max_issues_count": 9, "max_forks_count": 1, "avg_line_length": 28.4716981132, "max_line_length": 95, "alphanum_fraction": 0.6971504307}
"use strict";

var _enzymeMatchers = _interopRequireDefault(require("enzyme-matchers"));

var _serializer = _interopRequireDefault(require("enzyme-to-json/serializer"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* eslint-disable global-require */

/**
 * This source code is licensed under the MIT-style license found in the
 * LICENSE file in the root directory of this source tree. *
 *
 * @providesModule setupFilesAfterEnv
 * 
 */
if (global.bootstrapEnzymeEnvironment) {
  const {
    exposeGlobals
  } = require('jest-environment-enzyme/lib/setup');

  exposeGlobals();
} // add the snapshot serializer for Enzyme wrappers


expect.addSnapshotSerializer(_serializer.default); // add methods!

const matchers = {};
Object.keys(_enzymeMatchers.default).forEach(matcherKey => {
  const matcher = {
    [matcherKey](wrapper, ...args) {
      const result = _enzymeMatchers.default[matcherKey].call(this, wrapper, ...args);

      let message = this.isNot ? result.negatedMessage : result.message;

      if (result.contextualInformation.expected) {
        message += `\n${this.utils.RECEIVED_COLOR(result.contextualInformation.expected)}`;
      }

      if (result.contextualInformation.actual) {
        message += `\n${this.utils.EXPECTED_COLOR(result.contextualInformation.actual)}`;
      }

      return { ...result,
        message: () => message
      };
    }

  }[matcherKey];
  matchers[matcherKey] = matcher;
});
expect.extend(matchers);