<commit_before>var nsfw = require("../index.js");
var assert = require("assert");
var fse = require("fs-extra");
var path = require("path");
var Promise = require("bluebird");

describe('Node Sentinel File Watcher', function() {
  var workDir = path.resolve("./mockfs");

  beforeEach(function() {
    function makeDir(identifier) {
      fse.mkdirSync(path.join(workDir, "test" + identifier));
      fse.mkdirSync(path.join(workDir, "test" + identifier, "folder" + identifier));
      var fd = fse.openSync(path.join(workDir, "test" + identifier, "testing" + identifier +".file"), "w");
      fse.writeSync(fd, "testing");
      fse.closeSync(fd);
    }<commit_msg>Fix for appveyor tests<commit_after>var nsfw = require("../index.js");
var assert = require("assert");
var fse = require("fs-extra");
var path = require("path");
var Promise = require("bluebird");

describe('Node Sentinel File Watcher', function() {
  var workDir = path.resolve("./mockfs");

  beforeEach(function() {
    if (fse.existsSync(workDir)) {
      fse.removeSync(workDir);
    }

    function makeDir(identifier) {
      fse.mkdirSync(path.join(workDir, "test" + identifier));
      fse.mkdirSync(path.join(workDir, "test" + identifier, "folder" + identifier));
      var fd = fse.openSync(path.join(workDir, "test" + identifier, "testing" + identifier +".file"), "w");
      fse.writeSync(fd, "testing");
      fse.closeSync(fd);
    }
{'fraction_non_alphanumeric': 0.18033946251768035, 'fraction_numerical': 0.0, 'mean_word_length': 4.2407407407407405, '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': '6089216', 'n_tokens_mistral': 467, 'n_tokens_neox': 454, 'n_words': 98}