<commit_before>var assert = require('assert')

describe('Config', function () {
  beforeEach(function () {
    var resolved = require.resolve('app/config')

    delete require.cache[resolved]
  })

  after(function () {
    process.env.NODE_ENV = 'test'
  })

  it('should throw an error if incorrect environment', function () {
    process.env.NODE_ENV = 'nope'
    assert.throws(function () {
      require('app/config')
    }, /No config for environment 'nope'/)
  })

  it('should throw an error if secret key not set', function () {
    process.env.NODE_ENV = 'production'
    assert.throws(function () {
      require('app/config')
    }, /You must change the default secretKey/)
  })
})<commit_msg>Reset env back to existing env rather than test<commit_after>var assert = require('assert')
var currentEnv = process.env.NODE_ENV

describe('Config', function () {
  beforeEach(function () {
    var resolved = require.resolve('app/config')

    delete require.cache[resolved]
  })

  after(function () {
    process.env.NODE_ENV = currentEnv
  })

  it('should throw an error if incorrect environment', function () {
    process.env.NODE_ENV = 'nope'
    assert.throws(function () {
      require('app/config')
    }, /No config for environment 'nope'/)
  })

  it('should throw an error if secret key not set', function () {
    process.env.NODE_ENV = 'production'
    assert.throws(function () {
      require('app/config')
    }, /You must change the default secretKey/)
  })
})
{'fraction_non_alphanumeric': 0.14064602960969044, 'fraction_numerical': 0.0, 'mean_word_length': 3.3864306784660765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2315666', 'n_tokens_mistral': 442, 'n_tokens_neox': 431, 'n_words': 113}