<commit_before>// Copyright 2016 <NAME>.  All rights reserved.
// Use of this source code is governed by a MIT License
// License that can be found in the LICENSE file.

jest.unmock('./../MainHeader')

import React from 'react'
import {shallow} from 'enzyme'

import MainHeader from './../MainHeader'

describe('MainHeader', () => {
  it('should contain main-header class', () => {
    expect(
      shallow(<MainHeader />).hasClass('main-header')
    ).toBeTruthy()
  })

  it('should contain children passed down', () => {
    const comp = <MainHeader>
      <div>I'm a child</div>
    </MainHeader>

    expect(
      shallow(comp).contains(<div>I'm a child</div>)
    ).toBeTruthy()
  })
})
<commit_msg>Update MainHeader component test<commit_after>// Copyright 2016 <NAME>.  All rights reserved.
// Use of this source code is governed by a MIT License
// License that can be found in the LICENSE file.

jest.unmock('./../MainHeader')

import React from 'react'
import {shallow} from 'enzyme'

import MainHeader from './../MainHeader'

describe('MainHeader', () => {
  it('should contain main-header class', () => {
    expect(
      shallow(<MainHeader>anything</MainHeader>).hasClass('main-header')
    ).toBeTruthy()
  })

  it('should contain children passed down', () => {
    const comp = <MainHeader>
      <div>I'm a child</div>
    </MainHeader>

    expect(
      shallow(comp).contains(<div>I'm a child</div>)
    ).toBeTruthy()
  })

  it('should not contain anything than children passed down', () => {
    const comp = <MainHeader>
      <div>I'm a child</div>
    </MainHeader>

    expect(
      shallow(comp).contains(<div>I'm weird</div>)
    ).toBeFalsy()
  })
})

{'fraction_non_alphanumeric': 0.16064018968583285, 'fraction_numerical': 0.004742145820983995, 'mean_word_length': 3.199004975124378, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 33, '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': '7239004', 'n_tokens_mistral': 542, 'n_tokens_neox': 513, 'n_words': 153}