<commit_before>/* eslint-disable no-octal */
// vim: expandtab:ts=2:sw=2

const
  assert = require('assert'),
  tmp = require('../lib/tmp');


describe('tmp', function () {
  describe('dir()', function () {
    it('with invalid template', function (done) {
      tmp.dir({template:'invalid'}, function (err) {
        if (!err) return done(new Error('err expected'));
        try {
          assert.equal(err.message, 'Invalid template provided', 'should have thrown the expected error');
        } catch (err2) {
          done(err);
        }
        done();
      });
    });
  });
  describe('file()', function () {
    it('with invalid template', function (done) {
      tmp.file({template:'invalid'}, function (err) {
        if (!err) return done(new Error('err expected'));
        try {
          assert.equal(err.message, 'Invalid template provided', 'should have thrown the expected error');
        } catch (err2) {
          done(err);
        }
        done();
      });
    });
  });
});<commit_msg>Remove unnecessary whitespace<commit_after>/* eslint-disable no-octal */
// vim: expandtab:ts=2:sw=2

const
  assert = require('assert'),
  tmp = require('../lib/tmp');

describe('tmp', function () {
  describe('dir()', function () {
    it('with invalid template', function (done) {
      tmp.dir({template:'invalid'}, function (err) {
        if (!err) return done(new Error('err expected'));
        try {
          assert.equal(err.message, 'Invalid template provided', 'should have thrown the expected error');
        } catch (err2) {
          done(err);
        }
        done();
      });
    });
  });
  describe('file()', function () {
    it('with invalid template', function (done) {
      tmp.file({template:'invalid'}, function (err) {
        if (!err) return done(new Error('err expected'));
        try {
          assert.equal(err.message, 'Invalid template provided', 'should have thrown the expected error');
        } catch (err2) {
          done(err);
        }
        done();
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.1762114537444934, 'fraction_numerical': 0.003915810083210965, 'mean_word_length': 2.4761904761904763, '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': '3586900', 'n_tokens_mistral': 583, 'n_tokens_neox': 579, 'n_words': 150}