<commit_before>/* globals describe, it, before */
'use strict';
const chai    = require('chai');
const driver  = require('../index');
const chaiAsPromised = require('chai-as-promised');

chai.should();
chai.use(chaiAsPromised);

const expect = chai.expect;
let phantom;

describe('Phantom', function() {

  before(function(done) {
    // starting up phantom may take some time on the first run
    this.timeout(5000);
    return driver.create().then((ph) => {
      phantom = ph;
      done();
    });
  });

  describe('phantom.exit', function() {
    it('should close and return undefined', function(done) {
      return phantom.exit().should.eventually.equal(undefined).notify(done);
    });

    it('should cause all other functions to throw errors', function() {
      expect(phantom.hasExited()).to.equal(true);
      expect(() => phantom.throwIfExited()).to.throw(Error);
    });
  });
});<commit_msg>Fixes the name of a test<commit_after>/* globals describe, it, before */
'use strict';
const chai    = require('chai');
const driver  = require('../index');
const chaiAsPromised = require('chai-as-promised');

chai.should();
chai.use(chaiAsPromised);

const expect = chai.expect;
let phantom;

describe('phantom.exit', function() {

  before(function(done) {
    // starting up phantom may take some time on the first run
    this.timeout(5000);
    return driver.create().then((ph) => {
      phantom = ph;
      done();
    });
  });

  it('should close and return undefined', function(done) {
    return phantom.exit().should.eventually.equal(undefined).notify(done);
  });

  it('should cause all other functions to throw errors', function() {
    expect(phantom.hasExited()).to.equal(true);
    expect(() => phantom.throwIfExited()).to.throw(Error);
  });
});
{'fraction_non_alphanumeric': 0.16930022573363432, 'fraction_numerical': 0.004514672686230248, 'mean_word_length': 3.817934782608696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '313063', 'n_tokens_mistral': 575, 'n_tokens_neox': 535, 'n_words': 133}