<commit_before>process.env.NODE_ENV = 'test'
const {MongoClient} = require('mongodb'),
      N = require('nitroglycerin')


var db = null
const getDb = (done) => {
  if (db) return done(db)
  MongoClient.connect("mongodb://localhost:27017/exosphere-_____serviceRole_____-test", N( (mongoDb) => {
    db = mongoDb
    done(db)
  }))
}


module.exports = function() {

  this.setDefaultTimeout(1000)


  this.Before( function(_scenario, done) {
    getDb( (db) => {
      db.collection('_____modelName_____s').drop()
      done()
    })
  })


  this.After(function() {
    this.exocom && this.exocom.close()
    this.process && this.process.close()
  })


  this.registerHandler('AfterFeatures', (_event, done) => {
    getDb( (db) => {
      db.collection('_____modelName_____s').drop()
      db.close(function(err, result){
        if (err) { throw new Error(err) }
        done()
      })
    })
  })

}<commit_msg>Use named parameters on command-line<commit_after>process.env.NODE_ENV = 'test'
const {MongoClient} = require('mongodb'),
      N = require('nitroglycerin')


var db = null
const getDb = (done) => {
  if (db) return done(db)
  MongoClient.connect("mongodb://localhost:27017/exosphere-_____serviceRole_____-test", N( (mongoDb) => {
    db = mongoDb
    done(db)
  }))
}


module.exports = function() {

  this.setDefaultTimeout(1000)


  this.Before( function(_scenario, done) {
    getDb( (db) => {
      db.collection('_____modelName_____s').drop(function(err) {
        // ignore errors here, since we are only cleaning up the test database
        // and it might not even exist
        done()
      })
    })
  })


  this.After(function() {
    this.exocom && this.exocom.close()
    this.process && this.process.close()
  })


  this.registerHandler('AfterFeatures', (_event, done) => {
    getDb( (db) => {
      db.collection('_____modelName_____s').drop()
      db.close(function(err, result){
        if (err) { throw new Error(err) }
        done()
      })
    })
  })

}
{'fraction_non_alphanumeric': 0.163, 'fraction_numerical': 0.009, 'mean_word_length': 2.9702380952380953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6651587', 'n_tokens_mistral': 712, 'n_tokens_neox': 670, 'n_words': 126}