<commit_before>import { SortedList } from '../../../src/util/sorted-list'

export default (createInstance) => {
  describe('#creatives', () => {
    it('gets creatives', () => {
      const inst = createInstance()
      expect(inst.creatives).to.be.an.instanceof(SortedList)
    })
  })

  describe('#impressions', () => {
    it('gets impressions', () => {
      const inst = createInstance()
      expect(inst.impressions).to.be.an.instanceof(Array)
    })
  })

  describe('#extensions', () => {
    it('gets extensions', () => {
      const inst = createInstance()
      expect(inst.extensions).to.be.an.instanceof(Array)
    })
  })

  describe('#id', () => {
    it('sets id', () => {
      const inst = createInstance()
      const value = 'dummy'
      inst.id = value
      expect(inst.id).to.equal(value)
    })
  })

  describe('#adSystem', () => {
    it('sets adSystem', () => {
      const inst = createInstance()
      const value = 'dummy'
      inst.adSystem = value
      expect(inst.adSystem).to.equal(value)
    })
  })

  describe('#error', () => {
    it('sets error', () => {
      const inst = createInstance()
      const value = 'https://example.com/error'
      inst.error = value
      expect(inst.error).to.equal(value)
    })
  })
}<commit_msg>Add more tests for new errors property<commit_after>import { SortedList } from '../../../src/util/sorted-list'

export default (createInstance) => {
  describe('#creatives', () => {
    it('gets creatives', () => {
      const inst = createInstance()
      expect(inst.creatives).to.be.an.instanceof(SortedList)
    })
  })

  describe('#impressions', () => {
    it('gets impressions', () => {
      const inst = createInstance()
      expect(inst.impressions).to.be.an.instanceof(Array)
    })
  })

  describe('#extensions', () => {
    it('gets extensions', () => {
      const inst = createInstance()
      expect(inst.extensions).to.be.an.instanceof(Array)
    })
  })

  describe('#id', () => {
    it('sets id', () => {
      const inst = createInstance()
      const value = 'dummy'
      inst.id = value
      expect(inst.id).to.equal(value)
    })
  })

  describe('#adSystem', () => {
    it('sets adSystem', () => {
      const inst = createInstance()
      const value = 'dummy'
      inst.adSystem = value
      expect(inst.adSystem).to.equal(value)
    })
  })

  describe('#error', () => {
    it('sets error', () => {
      const inst = createInstance()
      const value = 'https://example.com/error'
      inst.error = value
      expect(inst.error).to.equal(value)
    })
  })

  describe('#errors', () => {
    it('sets multiple errors', () => {
      const inst = createInstance()
      const value1 = 'https://example.com/error'
      const value2 = 'https://example.com/error2'
      inst.errors.push(value1)
      inst.errors.push(value2)
      expect(inst.errors[0]).to.equal(value1)
      expect(inst.errors[1]).to.equal(value2)
    })
    it('is backwards compatible with error getter', () => {
      const inst = createInstance()
      const value = 'https://example.com/error'
      inst.errors.push(value)
      expect(inst.error).to.equal(value)
    })
    it('is backwards compatible with error setter', () => {
      const inst = createInstance()
      const value = 'https://example.com/error'
      inst.error = value
      expect(inst.errors[0]).to.equal(value)
    })
  })
}
{'fraction_non_alphanumeric': 0.18659580749926188, 'fraction_numerical': 0.002952465308532625, 'mean_word_length': 2.585185185185185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 6, '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': '2604154', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1053, 'n_words': 180}