<commit_before>"use strict";
/* eslint-env node,mocha */


const expect  = require('expect.js');
const path    = require('path');

const lookup  = require('../require/lookup');
const resolve = require('../require/resolve');


describe("Require functions", function() {

  it("Should test require resolve", function() {
    var folder = resolve("expect.js");
    expect(folder).to.eql(path.join(__dirname, "..", "node_modules", "expect.js"));
  });

  it("Should test require resolve failure", function() {
    try {
      resolve("nope");
      expect().fail("Never Here");
    } catch(err) {
      expect(err).to.be("nope");
    }
  });

  it("Should test Lookup", function() {
    var expect_path = path.join(__dirname, "..", "node_modules", "expect.js", "index.js");
    expect(lookup(expect_path).name).to.be('expect.js');
  });

  it("Should test Lookup cache", function() {
    var expect_path = path.join(__dirname, "..", "node_modules", "expect.js", "index.js");
    expect(lookup(expect_path).name).to.be('expect.js');
  });

  it("Should test Lookup throw", function() {
    var toto_path = path.join(__dirname, "..", "..", "nop.js");
    var result    = null;

    try {
      result = lookup(toto_path);
      expect().fail("Never here");
    } catch (err) {
      expect(err).to.be(`can't find ${toto_path} package`);
    }
  });

});

<commit_msg>With a typo<commit_after>"use strict";
/* eslint-env node,mocha */


const expect  = require('expect.js');
const path    = require('path');

const lookup  = require('../require/lookup');
const resolve = require('../require/resolve');


describe("Require functions", function() {

  it("Should test require resolve", function() {
    var folder = resolve("expect.js");
    expect(folder).to.eql(path.join(__dirname, "..", "node_modules", "expect.js"));
  });

  it("Should test require resolve failure", function() {
    try {
      resolve("nope");
      expect().fail("Never Here");
    } catch(err) {
      expect(err).to.be("nope");
    }
  });

  it("Should test Lookup", function() {
    var expect_path = path.join(__dirname, "..", "node_modules", "expect.js", "index.js");
    expect(lookup(expect_path).name).to.be('expect.js');
  });

  it("Should test Lookup cache", function() {
    var expect_path = path.join(__dirname, "..", "node_modules", "expect.js", "index.js");
    expect(lookup(expect_path).name).to.be('expect.js');
  });

  it("Should test Lookup throw", function() {
    var toto_path = path.join(__dirname, "..", "..", "nop.js");

    try {
      lookup(toto_path);
      expect().fail("Never here");
    } catch (err) {
      expect(err).to.be(`can't find ${toto_path} package`);
    }
  });

});


{'fraction_non_alphanumeric': 0.20893854748603352, 'fraction_numerical': 0.0, 'mean_word_length': 3.447019867549669, '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': '714946', 'n_tokens_mistral': 890, 'n_tokens_neox': 856, 'n_words': 174}