<commit_before>/*
 * npm-exists
 * https://github.com/parroit/npm-exists
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

var chai = require('chai');
chai.expect();
chai.should();

var npmExists = require('../lib/npm-exists.js');

describe('npmExists', function(){
    it('is defined', function(){
      npmExists.should.be.a('function');
    });

    it('return true for existant packages', function(done){
      npmExists('request')
          .then(function(moduleExists){
              moduleExists.should.be.equal(true);    
              
          }).then(done).catch(done);

      
    });


    it('return false for non existant packages', function(done){
      npmExists('this-module-doesnt-exist')
          .then(function(moduleExists){
              moduleExists.should.be.equal(false);    

          }).then(done).catch(done);

      
    });

});<commit_msg>increased test timeout<commit_after>/*
 * npm-exists
 * https://github.com/parroit/npm-exists
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

var chai = require('chai');
chai.expect();
chai.should();

var npmExists = require('../lib/npm-exists.js');

describe('npmExists', function(){
    this.timeout(20000);
    
    it('is defined', function(){
      npmExists.should.be.a('function');
    });

    it('return true for existant packages', function(done){
      npmExists('request')
          .then(function(moduleExists){
              moduleExists.should.be.equal(true);    

          }).then(done).catch(done);

      
    });


    it('return false for non existant packages', function(done){
      npmExists('this-module-doesnt-exist')
          .then(function(moduleExists){
              moduleExists.should.be.equal(false);    

          }).then(done).catch(done);

      
    });

});
{'fraction_non_alphanumeric': 0.16783974011911207, 'fraction_numerical': 0.007038440714672442, 'mean_word_length': 2.5538461538461537, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '203613', 'n_tokens_mistral': 590, 'n_tokens_neox': 546, 'n_words': 101}