<commit_before>var test = require('tap').test
    , Queue = require('fastqueue');
;

/**
 * We're using some internals so lets make sure they're not different
 * than when we wrote this.
 */
test('require', function(t) {
    var q;

    t.ok(Queue, 'fastqueue exists');
    t.type(Queue, 'function', 'require returns an object');
    t.equal(0, Object.keys(Queue).length, 'No hidden exports');

    q = new Queue();

    t.type(q, 'object', 'new Queue() returns an object');
    t.type(q.length, 'number', 'q.length');

    t.ok(Array.isArray(q.head), 'q.head = []');
    t.ok(Array.isArray(q.tail), 'q.tail = []');

    q.push(1);

    t.equal(1, q.length, 'push(length == 1)');
    t.equal(1, q.shift(), 'shift');
    t.equal(0, q.length, 'length == 0');

    t.end();
});<commit_msg>test/0.js :: create test to denote result of [].shift()<commit_after>var test = require('tap').test
    , Queue = require('fastqueue')
;

/**
 * We're using some internals so lets make sure they're not different
 * than when we wrote this.
 */
test('require', function(t) {
    var q;

    t.ok(Queue, 'fastqueue exists');
    t.type(Queue, 'function', 'require returns an object');
    t.equal(0, Object.keys(Queue).length, 'No hidden exports');

    q = new Queue();

    t.type(q, 'object', 'new Queue() returns an object');
    t.type(q.length, 'number', 'q.length');

    t.ok(Array.isArray(q.head), 'q.head = []');
    t.ok(Array.isArray(q.tail), 'q.tail = []');

    q.push(1);

    t.equal(1, q.length, 'push(length == 1)');
    t.equal(1, q.shift(), 'shift');
    t.equal(0, q.length, 'length == 0');

    t.equal(undefined, q.shift(), 'empty shift === undefined');

    t.end();
});
{'fraction_non_alphanumeric': 0.2133492252681764, 'fraction_numerical': 0.008939213349225268, 'mean_word_length': 3.250632911392405, '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': '4454203', 'n_tokens_mistral': 619, 'n_tokens_neox': 597, 'n_words': 150}