<commit_before><commit_msg>moved before to enivronment file<commit_after>var neo4j = require("../../../../lib/v1");

module.exports = function () {

  this.Before(function( scenario, callback ) {
    this.driver = neo4j.driver("bolt://localhost");
    this.session = this.driver.session();
    if (findTag(scenario, '@reset_database')) {
      this.session.run("MATCH (n) DETACH DELETE n").then( function( ) {
          callback();
      });
    }
    callback();
  });

  function findTag(scenario, tag) {
    for (var i in scenario.getTags()) {
      if (scenario.getTags()[i].getName() == tag) {
        return true
      }
    }
    return false;
  }
}
{'fraction_non_alphanumeric': 0.17835365853658536, 'fraction_numerical': 0.004573170731707317, 'mean_word_length': 2.711864406779661, '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': '6179975', 'n_tokens_mistral': 215, 'n_tokens_neox': 207, 'n_words': 42}