<commit_before>(function(D) {
/*
======== A Handy Little QUnit Reference ========
http://api.qunitjs.com/

Test methods:
  module(name, {[setup][ ,teardown]})
  test(name, callback)
  expect(numberOfAssertions)
  stop(increment)
  start(decrement)
Test assertions:
  ok(value, [message])
  equal(actual, expected, [message])
  notEqual(actual, expected, [message])
  deepEqual(actual, expected, [message])
  notDeepEqual(actual, expected, [message])
  strictEqual(actual, expected, [message])
  notStrictEqual(actual, expected, [message])
  throws(block, [expected], [message])
*/
    module("D");

    test('D._', function() {
        ok(D._, "D._ should be present");
    });

    test("D is for document", function() {
        strictEqual(D, document, "D is the document node");
    });

    var _ = D._;
    module("core API");

    test("_.", function() {
        equal(typeof _.version, "string", "_.version");
        strictEqual(_.slice, Array.prototype.slice, "_.slice");
        equal(typeof _.isList, "function", "_.isList");
        equal(Array.isArray(_.lists), true, "_.lists");
        equal(Array.isArray(_.nodes), true, "_.nodes");
        equal(typeof _.fn, "function", "_.fn");
        equal(typeof _.define, "function", "_.define");
        equal(typeof _.resolve, "function", "_.resolve");
        equal(typeof _.fill, "function", "_.fill");
    });

    test("D.extend", function() {
        equal(typeof D.extend, "function", "document.extend");
    });

    test("each()", function() {
        var set = _.lists.concat(_.nodes);
        expect(set.length);
        set.forEach(function(_class) {
            ok(_class.prototype.each, _class.name+'.prototype.each');
        });<commit_msg>more thorough testing of D.extend()<commit_after>(function(D) {
/*
======== A Handy Little QUnit Reference ========
http://api.qunitjs.com/

Test methods:
  module(name, {[setup][ ,teardown]})
  test(name, callback)
  expect(numberOfAssertions)
  stop(increment)
  start(decrement)
Test assertions:
  ok(value, [message])
  equal(actual, expected, [message])
  notEqual(actual, expected, [message])
  deepEqual(actual, expected, [message])
  notDeepEqual(actual, expected, [message])
  strictEqual(actual, expected, [message])
  notStrictEqual(actual, expected, [message])
  throws(block, [expected], [message])
*/
    module("D");

    test('D._', function() {
        ok(D._, "D._ should be present");
    });

    test("D is for document", function() {
        strictEqual(D, document, "D is the document node");
    });

    var _ = D._;
    module("core API");

    test("_.", function() {
        equal(typeof _.version, "string", "_.version");
        strictEqual(_.slice, Array.prototype.slice, "_.slice");
        equal(typeof _.isList, "function", "_.isList");
        equal(Array.isArray(_.lists), true, "_.lists");
        equal(Array.isArray(_.nodes), true, "_.nodes");
        equal(typeof _.fn, "function", "_.fn");
        equal(typeof _.define, "function", "_.define");
        equal(typeof _.resolve, "function", "_.resolve");
        equal(typeof _.fill, "function", "_.fill");
    });

    test("D.extend", function() {
        expect(_.lists.length*2 + 7);
        equal(typeof D.extend, "function", "document.extend");

        var fn = function() {
            ok(!_.isList(this));
            return new DOMxList(this);
        };

        D.extend('core_test', fn);
        equal(Element.prototype.core_test, fn);
        _.lists.forEach(function(_class) {
            equal(typeof _class.prototype.core_test, "function");
            equal(_class.prototype.core_test.name, 'listFn');
        });

        var ret = D.body.core_test();
        equal(ret.length, 1);

        ret = D.html.children.core_test();
        equal(ret.length, 2);
    });

    test("each()", function() {
        var set = _.lists.concat(_.nodes);
        expect(set.length);
        set.forEach(function(_class) {
            ok(_class.prototype.each, _class.name+'.prototype.each');
        });
{'fraction_non_alphanumeric': 0.18453865336658354, 'fraction_numerical': 0.000997506234413965, 'mean_word_length': 2.9870775347912524, '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': '449819', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1220, 'n_words': 264}