<commit_before>import deepEqual from 'deep-equal'
import isRegExp from 'is-regexp'
import invariant from './invariant'
import isFunction from './isFunction'
import functionThrows from './functionThrows'
import stringContains from './stringContains'
import arrayContains from './arrayContains'
import isA from './isA'

const isArray = Array.isArray

/**
 * An Expectation is a wrapper around an assertion that allows it to be written
 * in a more natural style, without the need to remember the order of arguments.
 * This helps prevent you from making mistakes when writing tests.
 */
class Expectation {

  constructor(actual) {
    if (!(this instanceof Expectation))
      return new Expectation(actual)

    this.actual = actual

    if (isFunction(actual)) {
      this.context = null
      this.args = []
    }
  }<commit_msg>Remove unnecessary check<commit_after>import deepEqual from 'deep-equal'
import isRegExp from 'is-regexp'
import invariant from './invariant'
import isFunction from './isFunction'
import functionThrows from './functionThrows'
import stringContains from './stringContains'
import arrayContains from './arrayContains'
import isA from './isA'

const isArray = Array.isArray

/**
 * An Expectation is a wrapper around an assertion that allows it to be written
 * in a more natural style, without the need to remember the order of arguments.
 * This helps prevent you from making mistakes when writing tests.
 */
class Expectation {

  constructor(actual) {
    this.actual = actual

    if (isFunction(actual)) {
      this.context = null
      this.args = []
    }
  }
{'fraction_non_alphanumeric': 0.08578584846587352, 'fraction_numerical': 0.0, 'mean_word_length': 3.8277945619335347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4083169', 'n_tokens_mistral': 418, 'n_tokens_neox': 409, 'n_words': 175}