<commit_before>// var chai = require('chai'),
//  expect = chai.expect;

var expect = require('chai').expect;

// I can list my tasks...
var taskList = [ ];



function listTasks() {

}

// I can add a task to my list

function addTaskToList(task, list){
  // what is the task? @param task
  // where is the task going? @param list
  // what order / priority? on the bottom
    return list.push(task);
}

expect(taskList.length).to.equal(0);
addTaskToList("Remember the milk", taskList);
expect(taskList[0]).to.equal("Remember the milk");
expect(taskList.length).to.equal(1);

// expect what?
expect(taskList.length).to.equal(1);
addTaskToList("Take out the trash", taskList);
expect(taskList[1]).to.equal("Take out the trash");
expect(taskList.length).to.equal(2);

expect(taskList.length).to.equal(2);
addTaskToList("Clean the bathroom", taskList);
expect(taskList[2]).to.equal("Clean the bathroom");
expect(taskList.length).to.equal(3);

expect(taskList.length).to.equal(3);
addTaskToList("Feed the dog", taskList);
expect(taskList[3]).to.equal("Feed the dog");
expect(taskList.length).to.equal(4);

expect(taskList.length).to.equal(4);
addTaskToList("Get the mail", taskList);
expect(taskList[4]).to.equal("Get the mail");
expect(taskList.length).to.equal(5);

// expectt what now?
console.log(taskList[0]);
console.log(taskList[1]);
console.log(taskList[2]);
console.log(taskList[3]);
console.log(taskList[4]);

// testing git add, commit and push<commit_msg>@pcreglow todo.js test with prioritize = FAIL<commit_after>// var chai = require('chai'),
//  expect = chai.expect;

var expect = require('chai').expect;

// I can list my tasks...
var taskList = [ ];



function listTasks() {

}

// I can add a task to my list

function addTaskToList(task, list){
  // what is the task? @param task
  // where is the task going? @param list
  // what order / priority? on the bottom
    return list.push(task);
}

expect(taskList.length).to.equal(0);
addTaskToList("Remember the milk", taskList);
expect(taskList[0]).to.equal("Remember the milk");
expect(taskList.length).to.equal(1);

// expect what?
expect(taskList.length).to.equal(1);
addTaskToList("Take out the trash", taskList);
expect(taskList[1]).to.equal("Take out the trash");
expect(taskList.length).to.equal(2);

expect(taskList.length).to.equal(2);
addTaskToList("Clean the bathroom", taskList);
expect(taskList[2]).to.equal("Clean the bathroom");
expect(taskList.length).to.equal(3);

expect(taskList.length).to.equal(3);
addTaskToList("Feed the dog", taskList);
expect(taskList[3]).to.equal("Feed the dog");
expect(taskList.length).to.equal(4);

expect(taskList.length).to.equal(4);
addTaskToList("Get the mail", taskList);
expect(taskList[4]).to.equal("Get the mail");
expect(taskList.length).to.equal(5);

console.log(taskList);



/*taskList.prototype.move = function (old_list, new_list) {
    while (old_list < 0) {
        old_list +- taskList.length;
    }
    while (new_list < 0) {
      new_list + taskList.length;
    }
    if (new_list >= taskList.length) {
      var k = new_index - taskList.length;
      while ((k--) + 1) {
        taskList.push(undefined);
     }
   }
taskList.splice(new_list, 0, taskList.splice(old_list, 1)[0]);
return taskList;
};

/*Array.prototype.move = function(from, to) {
  taskList.splice(to, 0, taskList.splice(from, 1)[0]);
};*/


// expectt what now?
/*console.log(taskList[0]);
console.log(taskList[1]);
console.log(taskList[2]);
console.log(taskList[3]);
console.log(taskList[4]);
*/
// testing git add, commit and push
{'fraction_non_alphanumeric': 0.17746957260118879, 'fraction_numerical': 0.013869232946504387, 'mean_word_length': 4.7, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3641332', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1225, 'n_words': 269}