<commit_before>const chai = require('chai')
const sinonChai = require('sinon-chai')
const expect = chai.expect
chai.use(sinonChai)

const fs = require('fs')
const { safeLoad } = require('js-yaml')
const { promisify } = require('util')
const readFile = promisify(fs.readFile)
const path = require('path')

const loadYamlFile = async (filename) => {
  const contents = await readFile(filename, { encoding: 'utf8' })
  return safeLoad(contents)
}

describe('challengeCountryMapping', () => {
  it('should have a country mapping for every challenge', async () => {
    const challenges = await loadYamlFile(path.join(__dirname, '../../data/static/challenges.yml'))
    const countryMapping = (await loadYamlFile(path.join(__dirname, '../../config/fbctf.yml'))).ctf.countryMapping

    for (const {key} of challenges) {
      expect(countryMapping, `Challenge "${key}" does not have a country Mapping.`).to.have.property(key)
    }
  })
})
<commit_msg>Made error message spelling more consistent<commit_after>const chai = require('chai')
const sinonChai = require('sinon-chai')
const expect = chai.expect
chai.use(sinonChai)

const fs = require('fs')
const { safeLoad } = require('js-yaml')
const { promisify } = require('util')
const readFile = promisify(fs.readFile)
const path = require('path')

const loadYamlFile = async (filename) => {
  const contents = await readFile(filename, { encoding: 'utf8' })
  return safeLoad(contents)
}

describe('challengeCountryMapping', () => {
  it('should have a country mapping for every challenge', async () => {
    const challenges = await loadYamlFile(path.join(__dirname, '../../data/static/challenges.yml'))
    const countryMapping = (await loadYamlFile(path.join(__dirname, '../../config/fbctf.yml'))).ctf.countryMapping

    for (const {key} of challenges) {
      expect(countryMapping, `Challenge "${key}" does not have a country mapping.`).to.have.property(key)
    }
  })
})

{'fraction_non_alphanumeric': 0.1548856548856549, 'fraction_numerical': 0.0010395010395010396, 'mean_word_length': 4.695266272189349, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3817494', 'n_tokens_mistral': 607, 'n_tokens_neox': 592, 'n_words': 147}