FACK1 / FARH

To do list app
https://fack1.github.io/FARH/html/index.html
0 stars 3 forks source link

Define expected and actual variables #21

Open shahenazmonia opened 6 years ago

shahenazmonia commented 6 years ago
test('test for adding new todo', function(t) {

  t.deepEqual(logic.addTodo([], 'new todo'),[{id: 1,description: 'new todo', done: false}],"new todo has been added!");
  t.end();
});

Define variables is best practice to make sure people who read the code kows what these arguments refer to

 var actual=logic.addTodo([], 'new todo';
var expected= [{id: 1,description: 'new todo', done: false}];
RazanTayyem commented 6 years ago

you are right we will do it