<commit_before>/*global setTimeout*/
const utils = require('./utils');
const arrayChanges = require('array-changes');
const arrayChangesAsync = require('array-changes-async');
const throwIfNonUnexpectedError = require('./throwIfNonUnexpectedError');
const objectIs = utils.objectIs;
const isRegExp = utils.isRegExp;
const extend = utils.extend;

module.exports = expect => {
  expect.addAssertion('<any> [not] to be (ok|truthy)', (expect, subject) => {
    const not = !!expect.flags.not;
    const condition = !!subject;
    if (condition === not) {
      expect.fail();
    }
  });

  expect.addAssertion(
    '<any> [not] to be (ok|truthy) <string>',
    (expect, subject, message) => {
      const not = !!expect.flags.not;
      const condition = !!subject;
      if (condition === not) {
        expect.fail({
          errorMode: 'bubble',
          message
        });
      }
    }
  );

  expect.addAssertion('<any> [not] to be <any>', (expect, subject, value) => {
    expect(objectIs(subject, value), '[not] to be truthy');
  });

  expect.addAssertion(
    '<string> [not] to be <string>',
    (expect, subject, value) => {
      expect(subject, '[not] to equal', value);<commit_msg>Fix test by making sure that the 'to be' assertion fails with a label<commit_after>/*global setTimeout*/
const utils = require('./utils');
const arrayChanges = require('array-changes');
const arrayChangesAsync = require('array-changes-async');
const throwIfNonUnexpectedError = require('./throwIfNonUnexpectedError');
const objectIs = utils.objectIs;
const isRegExp = utils.isRegExp;
const extend = utils.extend;

module.exports = expect => {
  expect.addAssertion('<any> [not] to be (ok|truthy)', (expect, subject) => {
    const not = !!expect.flags.not;
    const condition = !!subject;
    if (condition === not) {
      expect.fail();
    }
  });

  expect.addAssertion(
    '<any> [not] to be (ok|truthy) <string>',
    (expect, subject, message) => {
      const not = !!expect.flags.not;
      const condition = !!subject;
      if (condition === not) {
        expect.fail({
          errorMode: 'bubble',
          message
        });
      }
    }
  );

  expect.addAssertion('<any> [not] to be <any>', (expect, subject, value) => {
    expect.withError(
      () => expect(objectIs(subject, value), '[not] to be truthy'),
      err => {
        err.label = 'should be';
        expect.fail(err);
      }
    );
  });

  expect.addAssertion(
    '<string> [not] to be <string>',
    (expect, subject, value) => {
      expect(subject, '[not] to equal', value);
{'fraction_non_alphanumeric': 0.1679002726918582, 'fraction_numerical': 0.0, 'mean_word_length': 3.1153846153846154, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 29, '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': '63918', 'n_tokens_mistral': 787, 'n_tokens_neox': 801, 'n_words': 204}