<commit_before>const faker = require('faker')
const proxyquire = require('proxyquire')

const modulePath = '../urls'

describe('urls', () => {
  let urls
  before(() => {
    urls = proxyquire(modulePath, {
      '../config': {
        greatProfileUrl: 'http://a.b.c.com/path/{id}',
      },
    })
  })

  describe('external', () => {
    it('should have the correct urls', () => {
      const companyNumber = faker.random.alphaNumeric(8)
      expect(urls.external.greatProfile(companyNumber)).to.equal(`http://a.b.c.com/path/${companyNumber}`)
    })
  })

  describe('dashboard', () => {
    it('should return the correct value', () => {
      expect(urls.dashboard()).to.equal('/')
      expect(urls.dashboard.mountPoint).to.equal('/')
      expect(urls.dashboard.route).to.equal('/')
    })
  })

  describe('companies', () => {
    let companyId
    beforeEach(() => {
      companyId = faker.random.uuid()
    })
    it('should return the correct values', () => {
      expect(urls.companies.index.mountPoint).to.equal('/companies')
      expect(urls.companies.index.route).to.equal('/')
      expect(urls.companies.index()).to.equal('/companies')

      expect(urls.companies.detail.route).to.equal('/:companyId')
      expect(urls.companies.detail(companyId)).to.equal(`/companies/${companyId}`)

      expect(urls.companies.activity.data(companyId)).to.equal(`/companies/${companyId}/activity/data`)
      expect(urls.companies.activity.index(companyId)).to.equal(`/companies/${companyId}/activity`)

      expect(urls.companies.advisers.index(companyId)).to.equal(`/companies/${companyId}/advisers`)

      expect(urls.companies.advisers.confirm(companyId)).to.equal(`/companies/${companyId}/advisers/confirm`)
      expect(urls.companies.advisers.replace(companyId)).to.equal(`/companies/${companyId}/advisers/replace`)

      expect(urls.companies.dnbSubsidiaries.index.route).to.equal('/:companyId/dnb-subsidiaries')
      expect(urls.companies.dnbSubsidiaries.index(companyId)).to.equal(`/companies/${companyId}/dnb-subsidiaries`)

      expect(urls.companies.dnbSubsidiaries.data.route).to.equal('/:companyId/dnb-subsidiaries/data')
      expect(urls.companies.dnbSubsidiaries.data(companyId)).to.equal(`/companies/${companyId}/dnb-subsidiaries/data`)

      expect(urls.companies.exports.route).to.equal('/:companyId/exports')
      expect(urls.companies.exports(companyId)).to.equal(`/companies/${companyId}/exports`)

      expect(urls.companies.subsidiaries(companyId)).to.equal(`/companies/${companyId}/subsidiaries`)

      const globalHqId = faker.random.uuid()
      expect(urls.companies.hierarchies.ghq.add.route).to.equal('/:companyId/hierarchies/ghq/:globalHqId/add')
      expect(urls.companies.hierarchies.ghq.add(companyId, globalHqId)).to.equal(`/companies/${companyId}/hierarchies/ghq/${globalHqId}/add`)

      const interactionId = faker.random.uuid()
      expect(urls.companies.interactions.create.route).to.equal(`/interactions/:interactionId?/create`)
      expect(urls.companies.interactions.create(companyId)).to.equal(`/companies/${companyId}/interactions/create`)
      expect(urls.companies.interactions.create(companyId, interactionId)).to.equal(`/companies/${companyId}/interactions/${interactionId}/create`)

      expect(urls.companies.orders(companyId)).to.equal(`/companies/${companyId}/orders`)<commit_msg>Fixed failing unit tests after rebase<commit_after>const faker = require('faker')
const proxyquire = require('proxyquire')

const modulePath = '../urls'

describe('urls', () => {
  let urls
  before(() => {
    urls = proxyquire(modulePath, {
      '../config': {
        greatProfileUrl: 'http://a.b.c.com/path/{id}',
      },
    })
  })

  describe('external', () => {
    it('should have the correct urls', () => {
      const companyNumber = faker.random.alphaNumeric(8)
      expect(urls.external.greatProfile(companyNumber)).to.equal(`http://a.b.c.com/path/${companyNumber}`)
    })
  })

  describe('dashboard', () => {
    it('should return the correct value', () => {
      expect(urls.dashboard()).to.equal('/')
      expect(urls.dashboard.mountPoint).to.equal('/')
      expect(urls.dashboard.route).to.equal('/')
    })
  })

  describe('companies', () => {
    let companyId
    beforeEach(() => {
      companyId = faker.random.uuid()
    })
    it('should return the correct values', () => {
      expect(urls.companies.index.mountPoint).to.equal('/companies')
      expect(urls.companies.index.route).to.equal('/')
      expect(urls.companies.index()).to.equal('/companies')

      expect(urls.companies.detail.route).to.equal('/:companyId')
      expect(urls.companies.detail(companyId)).to.equal(`/companies/${companyId}`)

      expect(urls.companies.activity.data(companyId)).to.equal(`/companies/${companyId}/activity/data`)
      expect(urls.companies.activity.index(companyId)).to.equal(`/companies/${companyId}/activity`)

      expect(urls.companies.advisers.index(companyId)).to.equal(`/companies/${companyId}/advisers`)

      expect(urls.companies.advisers.confirm(companyId)).to.equal(`/companies/${companyId}/advisers/add`)
      expect(urls.companies.advisers.replace(companyId)).to.equal(`/companies/${companyId}/advisers/replace`)

      expect(urls.companies.dnbSubsidiaries.index.route).to.equal('/:companyId/dnb-subsidiaries')
      expect(urls.companies.dnbSubsidiaries.index(companyId)).to.equal(`/companies/${companyId}/dnb-subsidiaries`)

      expect(urls.companies.dnbSubsidiaries.data.route).to.equal('/:companyId/dnb-subsidiaries/data')
      expect(urls.companies.dnbSubsidiaries.data(companyId)).to.equal(`/companies/${companyId}/dnb-subsidiaries/data`)

      expect(urls.companies.exports.route).to.equal('/:companyId/exports')
      expect(urls.companies.exports(companyId)).to.equal(`/companies/${companyId}/exports`)

      expect(urls.companies.subsidiaries(companyId)).to.equal(`/companies/${companyId}/subsidiaries`)

      const globalHqId = faker.random.uuid()
      expect(urls.companies.hierarchies.ghq.add.route).to.equal('/:companyId/hierarchies/ghq/:globalHqId/add')
      expect(urls.companies.hierarchies.ghq.add(companyId, globalHqId)).to.equal(`/companies/${companyId}/hierarchies/ghq/${globalHqId}/add`)

      const interactionId = faker.random.uuid()
      expect(urls.companies.interactions.create.route).to.equal(`/interactions/:interactionId?/create`)
      expect(urls.companies.interactions.create(companyId)).to.equal(`/companies/${companyId}/interactions/create`)
      expect(urls.companies.interactions.create(companyId, interactionId)).to.equal(`/companies/${companyId}/interactions/${interactionId}/create`)

      expect(urls.companies.orders(companyId)).to.equal(`/companies/${companyId}/orders`)
{'fraction_non_alphanumeric': 0.18646080760095013, 'fraction_numerical': 0.0002969121140142518, 'mean_word_length': 4.279780564263323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '1529299', 'n_tokens_mistral': 2255, 'n_tokens_neox': 2250, 'n_words': 162}