<commit_before>/// <reference path="chai.d.ts" />
import chai = require('chai');

// ReSharper disable WrongExpressionStatement

var expect = chai.expect;
var assert = chai.assert;
var should = chai.should();
declare var err: Function;

function chaiVersion() {
    expect(chai).to.have.property('version');
    (<Object><{}>chai).should.have.property('version');
}

function assertion() {
    expect('test').to.be.a('string');
    'test'.should.be.a('string');
    expect('foo').to.equal('foo');
    'foo'.should.equal('foo');
    should.equal('foo', 'foo');
}

function fail() {
    err(() => {
        should.fail('foo', 'bar');
    }, 'expected fail to throw an AssertionError');
    err(() => {
        should.fail('foo', 'bar', 'should fail');
    }, 'expected fail to throw an AssertionError');
    err(() => {
        should.fail('foo', 'bar', 'should fail', 'equal');
    }, 'expected fail to throw an AssertionError');
}

// ReSharper disable once InconsistentNaming
function _true() {
    expect(true).to.be.true;
    true.should.be.true;
    expect(false).to.not.be.true;
    false.should.not.be.true;
    expect(1).to.not.be.true;
    (1).should.not.be.true;

    err(() => {
        expect('test').to.be.true;
        'test'.should.be.true;
    }, 'expected \'test\' to be true');
}

function ok() {
    expect(true).to.be.ok;
    true.should.be.ok;
    expect(false).to.not.be.ok;
    false.should.not.be.ok;
    expect(1).to.be.ok;
    (1).should.be.ok;
    expect(0).to.not.be.ok;
    (0).should.not.be.ok;

    err(() => {
        expect('').to.be.ok;
        ''.should.be.ok;
    }, 'expected \'\' to be truthy');

    err(() => {
        expect('test').to.not.be.ok;
        'test'.should.not.be.ok;
    }, 'expected \'test\' to be falsy');
}

function _false() {
    expect(false).to.be.false;
    false.should.be.false;
    expect(true).to.not.be.false;
    true.should.not.be.false;
    expect(0).to.not.be.false;
    (0).should.not.be.false;

    err(() => {
        expect('').to.be.false;
        ''.should.be.false;
    }, 'expected \'\' to be false');
}

function _null() {
    expect(null).to.be.null;
    should.equal(null, null);
    expect(false).to.not.be.null;
    false.should.not.be.null;

    err(() => {
        expect('').to.be.null;
        ''.should.be.null;
    }, 'expected \'\' to be null');
}

function _undefined() {
    expect(undefined).to.be.undefined;
    should.equal(undefined, undefined);
    expect(null).to.not.be.undefined;
    should.not.equal(null, undefined);

    err(() => {
        expect('').to.be.undefined;
        ''.should.be.undefined;
    }, 'expected \'\' to be undefined');
}

function exist() {
    var foo = 'bar';
    expect(foo).to.exist;
    should.exist(foo);
    expect(void(0)).to.not.exist;
    should.not.exist(void (0));
}

function arguments() {
    var args = arguments;
    expect(args).to.be.arguments;
    args.should.be.arguments;
    expect([]).to.not.be.arguments;
    [].should.not.be.arguments;
    expect(args).to.be.an('arguments').and.be.arguments;
    args.should.be.an('arguments').and.be.arguments;
    expect([]).to.be.an('array').and.not.be.Arguments;
    [].should.be.an('array').and.not.be.Arguments;
}

function equal() {
    expect(undefined).to.equal(void(0));
    should.equal(undefined, void(0));
}

function _typeof() {<commit_msg>arguments -> argumentsTest for strict mode-implied modules.<commit_after>/// <reference path="chai.d.ts" />
import chai = require('chai');

// ReSharper disable WrongExpressionStatement

var expect = chai.expect;
var assert = chai.assert;
var should = chai.should();
declare var err: Function;

function chaiVersion() {
    expect(chai).to.have.property('version');
    (<Object><{}>chai).should.have.property('version');
}

function assertion() {
    expect('test').to.be.a('string');
    'test'.should.be.a('string');
    expect('foo').to.equal('foo');
    'foo'.should.equal('foo');
    should.equal('foo', 'foo');
}

function fail() {
    err(() => {
        should.fail('foo', 'bar');
    }, 'expected fail to throw an AssertionError');
    err(() => {
        should.fail('foo', 'bar', 'should fail');
    }, 'expected fail to throw an AssertionError');
    err(() => {
        should.fail('foo', 'bar', 'should fail', 'equal');
    }, 'expected fail to throw an AssertionError');
}

// ReSharper disable once InconsistentNaming
function _true() {
    expect(true).to.be.true;
    true.should.be.true;
    expect(false).to.not.be.true;
    false.should.not.be.true;
    expect(1).to.not.be.true;
    (1).should.not.be.true;

    err(() => {
        expect('test').to.be.true;
        'test'.should.be.true;
    }, 'expected \'test\' to be true');
}

function ok() {
    expect(true).to.be.ok;
    true.should.be.ok;
    expect(false).to.not.be.ok;
    false.should.not.be.ok;
    expect(1).to.be.ok;
    (1).should.be.ok;
    expect(0).to.not.be.ok;
    (0).should.not.be.ok;

    err(() => {
        expect('').to.be.ok;
        ''.should.be.ok;
    }, 'expected \'\' to be truthy');

    err(() => {
        expect('test').to.not.be.ok;
        'test'.should.not.be.ok;
    }, 'expected \'test\' to be falsy');
}

function _false() {
    expect(false).to.be.false;
    false.should.be.false;
    expect(true).to.not.be.false;
    true.should.not.be.false;
    expect(0).to.not.be.false;
    (0).should.not.be.false;

    err(() => {
        expect('').to.be.false;
        ''.should.be.false;
    }, 'expected \'\' to be false');
}

function _null() {
    expect(null).to.be.null;
    should.equal(null, null);
    expect(false).to.not.be.null;
    false.should.not.be.null;

    err(() => {
        expect('').to.be.null;
        ''.should.be.null;
    }, 'expected \'\' to be null');
}

function _undefined() {
    expect(undefined).to.be.undefined;
    should.equal(undefined, undefined);
    expect(null).to.not.be.undefined;
    should.not.equal(null, undefined);

    err(() => {
        expect('').to.be.undefined;
        ''.should.be.undefined;
    }, 'expected \'\' to be undefined');
}

function exist() {
    var foo = 'bar';
    expect(foo).to.exist;
    should.exist(foo);
    expect(void(0)).to.not.exist;
    should.not.exist(void (0));
}

function argumentsTest() {
    var args = arguments;
    expect(args).to.be.arguments;
    args.should.be.arguments;
    expect([]).to.not.be.arguments;
    [].should.not.be.arguments;
    expect(args).to.be.an('arguments').and.be.arguments;
    args.should.be.an('arguments').and.be.arguments;
    expect([]).to.be.an('array').and.not.be.Arguments;
    [].should.be.an('array').and.not.be.Arguments;
}

function equal() {
    expect(undefined).to.equal(void(0));
    should.equal(undefined, void(0));
}

function _typeof() {
{'fraction_non_alphanumeric': 0.21105826397146255, 'fraction_numerical': 0.0035671819262782403, 'mean_word_length': 2.7466592427616927, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 28, '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': '2311687', 'n_tokens_mistral': 2406, 'n_tokens_neox': 2373, 'n_words': 379}