<commit_before>import {
  getStreamAction, shouldContainerUpdate,
} from '../../../src/containers/SearchContainer'

describe('SearchContainer', () => {
  context('#getStreamAction', () => {
    it('returns the correct stream action for user search', () => {
      const vo = { terms: '@mansfield', type: 'users' }
      const action = getStreamAction(vo)
      expect(action.payload.endpoint.path).to.contain('/users?per_page=25&terms=%40mansfield')
    })

    it('returns the correct stream action for post search', () => {
      const vo = { terms: 'danger', type: 'posts' }
      const action = getStreamAction(vo)
      expect(action.payload.endpoint.path).to.contain('/posts?per_page=25&terms=danger')
    })
  })

  context('#shouldContainerUpdate', () => {
    it('returns the correct stream action for user search', () => {
      const thisProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: {},
        terms: '@mansfield',
        type: 'users',
      }
      const sameProps = { ...thisProps }
      const nextProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: { stuff: 'stuff' },
        terms: 'danger',
        type: 'posts',
      }
      const lastProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: { stuff: 'stuff' },
        terms: 'danger_zo',
        type: 'posts',
      }
      const shouldSameUpdate = shouldContainerUpdate(thisProps, sameProps)
      const shouldNextUpdate = shouldContainerUpdate(thisProps, nextProps)
      const shouldLastUpdate = shouldContainerUpdate(nextProps, lastProps)
      expect(shouldSameUpdate).to.be.false
      expect(shouldNextUpdate).to.be.true
      expect(shouldLastUpdate).to.be.true
    })
  })
})

<commit_msg>Fix up a test<commit_after>import {
  getStreamAction, shouldContainerUpdate,
} from '../../../src/containers/SearchContainer'

describe('SearchContainer', () => {
  context('#getStreamAction', () => {
    it('returns the correct stream action for user search', () => {
      const action = getStreamAction('@mansfield', 'users')
      expect(action.payload.endpoint.path).to.contain('/users?per_page=25&terms=%40mansfield')
    })

    it('returns the correct stream action for post search', () => {
      const action = getStreamAction('danger', 'posts')
      expect(action.payload.endpoint.path).to.contain('/posts?per_page=25&terms=danger')
    })
  })

  context('#shouldContainerUpdate', () => {
    it('returns the correct stream action for user search', () => {
      const thisProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: {},
        terms: '@mansfield',
        type: 'users',
      }
      const sameProps = { ...thisProps }
      const nextProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: { stuff: 'stuff' },
        terms: 'danger',
        type: 'posts',
      }
      const lastProps = {
        coverDPI: 'xhdpi',
        isLoggedIn: true,
        pathname: '/search',
        promitions: { stuff: 'stuff' },
        terms: 'danger_zo',
        type: 'posts',
      }
      const shouldSameUpdate = shouldContainerUpdate(thisProps, sameProps)
      const shouldNextUpdate = shouldContainerUpdate(thisProps, nextProps)
      const shouldLastUpdate = shouldContainerUpdate(nextProps, lastProps)
      expect(shouldSameUpdate).to.be.false
      expect(shouldNextUpdate).to.be.true
      expect(shouldLastUpdate).to.be.true
    })
  })
})


{'fraction_non_alphanumeric': 0.1434065934065934, 'fraction_numerical': 0.0032967032967032967, 'mean_word_length': 2.7229038854805725, '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': '6097874', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1055, 'n_words': 219}