<commit_before>const expect = require('chai').expect
const mocha = require('mocha')

describe('when using common-locations module', () => {
  const memfs = require('memfs')
  const os = require('os')
  const path = require('path')
  const util = require('util')
  const vfs = require('./vfs')('test')

  const username = os.userInfo().username

  const dir = {
    config: {
      local: os.platform() === 'win32' ?
        util.format('Users\\%s\\AppData\\Roaming\\%s\\config', username, 'test') : util.format('/etc/%s', 'test')
    },
    etc: os.platform() === 'win32' ?
      util.format('Users\\%s\\etc', username) : util.format('/home/%s/etc', username),
    home: os.platform() === 'win32' ?
      util.format('Users\\%s', username) : util.format('/home/%s', username)
  }

  const locations = require('../lib')
  const common = locations.use('test', vfs.volume)

  describe('to access files in the user\'s home directory', () => {
    if (os.platform() === 'win32') {

      it('should exist', () => expect(common.home())
        .to.equal(path.join('C:\\', dir.home)))

      it('should exist with additional parts', () => expect(common.home('etc', 'test'))
        .to.equal(path.join('C:\\', dir.etc, 'test')))

    } else {

      it('should exist', () => expect(common.home())
        .to.equal(dir.home))

      it('should exist with additional parts', () => expect(common.home('etc', 'test'))
        .to.equal(path.join(dir.etc, 'test')))

    }
  })

  describe('to access configuration files', () => {

    if (os.platform() === 'win32') {

      it('should exist', () => expect(common.config.local())
        .to.equal(path.join('C:\\', dir.config.local)))

    } else {

      it('should exist', () => expect(common.config.local())
        .to.equal(dir.config.local))

    }

  })
})
<commit_msg>fixing tests<commit_after>const expect = require('chai').expect
const mocha = require('mocha')

describe('when using common-locations module', () => {
  const memfs = require('memfs')
  const os = require('os')
  const path = require('path')
  const util = require('util')
  const vfs = require('./vfs')('common-locations')

  const username = os.userInfo().username

  const dir = {
    config: {
      local: os.platform() === 'win32' ?
        util.format('Users\\%s\\AppData\\Roaming\\%s\\config', username, 'common-locations') : util.format('/etc/%s', 'common-locations')
    },
    etc: os.platform() === 'win32' ?
      util.format('Users\\%s\\etc', username) : util.format('/home/%s/etc', username),
    home: os.platform() === 'win32' ?
      util.format('Users\\%s', username) : util.format('/home/%s', username)
  }

  const locations = require('../lib')
  const common = locations.use('common-locations', vfs.volume)

  describe('to access files in the user\'s home directory', () => {
    if (os.platform() === 'win32') {

      it('should exist', () => expect(common.home())
        .to.equal(path.join('C:\\', dir.home)))
      it('should exist with additional parts', () => expect(common.home('etc', 'test'))
        .to.equal(path.join('C:\\', dir.etc, 'test')))

    } else {

      it('should exist', () => expect(common.home())
        .to.equal(dir.home))
      it('should exist with additional parts', () => expect(common.home('etc', 'test'))
        .to.equal(path.join(dir.etc, 'test')))

    }
  })

  describe('to access configuration files', () => {

    if (os.platform() === 'win32') {

      it('should exist', () => expect(common.config.local())
        .to.equal(path.join('C:\\', dir.config.local)))

      it('should exist with additional parts', () => expect(common.config.local('test'))
        .to.equal(path.join('C:\\', dir.config.local, 'test')))

    } else {

      it('should exist', () => expect(common.config.local())
        .to.equal(dir.config.local))

      it('should exist with additional parts', () => expect(common.config.local('test'))
        .to.equal(path.join(dir.config.local, 'test')))

    }

  })
})

{'fraction_non_alphanumeric': 0.22116109575270168, 'fraction_numerical': 0.005026388539834129, 'mean_word_length': 3.0570846075433233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '5308325', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1258, 'n_words': 252}