<commit_before>///<reference path="../../typings/jasmine/jasmine.d.ts" />

import IsLawModule = require("../../src/courtroom/laws/is");

const IsLaw = IsLawModule.IsLaw;

describe("IsLaw verdict tests (null and undefined)", function() {
  it("should return 'false' when not null and checking for null", function() {
    var a = new IsLaw(null);

    expect(a.verdict(undefined)).toBe(false);
  });

  it("should return 'true' when null and checking for null", function() {
    var a = new IsLaw(null);

    expect(a.verdict(null)).toBe(true);
  });

  it("should return 'false' when not undefined and checking for undefined", function() {
    var a = new IsLaw(undefined);

    expect(a.verdict(null)).toBe(false);
  });

  it("should return 'true' when undefined and checking for undefined", function() {
    var a = new IsLaw(undefined);

    expect(a.verdict(undefined)).toBe(true);
  });
});

describe("IsLaw verdict tests (numeric)", function() {
  it("should return 'true' when numbers match", function() {
    var a = new IsLaw(1);

    expect(a.verdict(1)).toBe(true);
  });

  it("should return 'false' when numbers don't match", function() {
    var a = new IsLaw(1);

    expect(a.verdict(2)).toBe(false);
  });
});

describe("IsLaw verdict tests (string)", function() {
  it("should return 'true' when strings match", function() {
    var a = new IsLaw("james");

    expect(a.verdict("james")).toBe(true);
  });

  it("should return 'false' when strings don't match", function() {
    var a = new IsLaw("james");

    expect(a.verdict("william")).toBe(false);
  });
});<commit_msg>Use mocha/expect.js in laws/is.spec<commit_after>///<reference path="../../typings/expect.js/expect.js.d.ts" />
///<reference path="../../typings/mocha/mocha.d.ts" />

import expect = require('expect.js');
import IsLawModule = require("../../src/courtroom/laws/is");

const IsLaw = IsLawModule.IsLaw;

describe("IsLaw verdict tests (null and undefined)", function() {
  it("should return 'false' when not null and checking for null", function() {
    var a = new IsLaw(null);

    expect(a.verdict(undefined)).to.be(false);
  });

  it("should return 'true' when null and checking for null", function() {
    var a = new IsLaw(null);

    expect(a.verdict(null)).to.be(true);
  });

  it("should return 'false' when not undefined and checking for undefined", function() {
    var a = new IsLaw(undefined);

    expect(a.verdict(null)).to.be(false);
  });

  it("should return 'true' when undefined and checking for undefined", function() {
    var a = new IsLaw(undefined);

    expect(a.verdict(undefined)).to.be(true);
  });
});

describe("IsLaw verdict tests (numeric)", function() {
  it("should return 'true' when numbers match", function() {
    var a = new IsLaw(1);

    expect(a.verdict(1)).to.be(true);
  });

  it("should return 'false' when numbers don't match", function() {
    var a = new IsLaw(1);

    expect(a.verdict(2)).to.be(false);
  });
});

describe("IsLaw verdict tests (string)", function() {
  it("should return 'true' when strings match", function() {
    var a = new IsLaw("james");

    expect(a.verdict("james")).to.be(true);
  });

  it("should return 'false' when strings don't match", function() {
    var a = new IsLaw("james");

    expect(a.verdict("william")).to.be(false);
  });
});
{'fraction_non_alphanumeric': 0.18461538461538463, 'fraction_numerical': 0.0024132730015082957, 'mean_word_length': 3.8338192419825075, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '4585446', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1048, 'n_words': 282}