<commit_before>import React from 'react'
import ReactTestUtils from 'react-addons-test-utils'
import { CustomDomainWrapper } from '../../pages/CustomDomainWrapper'
import ShowMobilization from '../../pages/ShowMobilization'

describe('CustomDomainWrapper', () => {
  it('should not render ShowMobilization when there is no mobilization', () => {
    const component = ReactTestUtils.renderIntoDocument(
      <CustomDomainWrapper mobilizations={{data: []}} />
    )

    const divs = ReactTestUtils.scryRenderedComponentsWithType(component, ShowMobilization)
    expect(divs.length).to.be.eql(0)
  })

  it('should render ShowMobilization when there is a mobilization', () => {
    const component = ReactTestUtils.renderIntoDocument(
      <CustomDomainWrapper
        mobilizations={{data: [{id: 1}]}}
        blocks={{data: []}}
        widgets={{data: []}}
      />
    )

    const divs = ReactTestUtils.scryRenderedComponentsWithType(component, ShowMobilization)
    expect(divs.length).to.be.eql(1)
  })
})
<commit_msg>[#98822994] fix tests<commit_after>import React from 'react/addons'
import { CustomDomainWrapper } from '../../pages/CustomDomainWrapper'
import ShowMobilization from '../../pages/ShowMobilization'

const { TestUtils } = React.addons

describe('CustomDomainWrapper', () => {
  it('should not render ShowMobilization when there is no mobilization', () => {
    const component = TestUtils.renderIntoDocument(
      <CustomDomainWrapper mobilizations={{data: []}} />
    )

    const divs = TestUtils.scryRenderedComponentsWithType(component, ShowMobilization)
    expect(divs.length).to.be.eql(0)
  })

  it('should render ShowMobilization when there is a mobilization', () => {
    const component = TestUtils.renderIntoDocument(
      <CustomDomainWrapper
        mobilizations={{data: [{id: 1}]}}
        blocks={{data: []}}
        widgets={{data: []}}
      />
    )

    const divs = TestUtils.scryRenderedComponentsWithType(component, ShowMobilization)
    expect(divs.length).to.be.eql(1)
  })
})

{'fraction_non_alphanumeric': 0.1374384236453202, 'fraction_numerical': 0.006896551724137931, 'mean_word_length': 4.014814814814815, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '3012176', 'n_tokens_mistral': 602, 'n_tokens_neox': 593, 'n_words': 117}