<commit_before>import expect, { createSpy } from 'expect'
import every from '../every'

describe('every', () => {
  it('should return true when given undefined', () => {
    const spy = createSpy()
    expect(every(undefined)).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return true when given an empty array', () => {
    const spy = createSpy()
    expect(every([])).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return true when given an empty object', () => {
    const spy = createSpy()
    expect(every({})).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return false not every array element fails', () => {
    const spy = createSpy(value => value === 'a').andCallThrough()
    expect(every([ 'a', 'b' ], spy)).toBe(false)
    expect(spy).toHaveBeenCalled()<commit_msg>Add missing spy check<commit_after>import expect, { createSpy } from 'expect'
import every from '../every'

describe('every', () => {
  it('should return true when given undefined', () => {
    const spy = createSpy()
    expect(every(undefined, spy)).toBe(true)
    expect(every(null, spy)).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return true when given an empty array', () => {
    const spy = createSpy()
    expect(every([], spy)).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return true when given an empty object', () => {
    const spy = createSpy()
    expect(every({}, spy)).toBe(true)
    expect(spy).toNotHaveBeenCalled()
  })

  it('should return false not every array element fails', () => {
    const spy = createSpy(value => value === 'a').andCallThrough()
    expect(every([ 'a', 'b' ], spy)).toBe(false)
    expect(spy).toHaveBeenCalled()
{'fraction_non_alphanumeric': 0.1732418524871355, 'fraction_numerical': 0.0, 'mean_word_length': 3.971590909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '2625800', 'n_tokens_mistral': 551, 'n_tokens_neox': 549, 'n_words': 137}