Description
Please write helpful messages in the test: change "xd" and "33333333333sortTodos" in each test.
t . deepEqual ( actual , expected , "xd" ) ;
Why are you doing logic in the test? And what do v and b mean? Please make sure you're writing semantically.
test ( 'sortTodos' , function ( t ) {
var a = [
{ id : - 1 , description : 'third todo' , done :true } ,
{ id : - 2 , description : 'second todo' , done :true } ,
{ id : 0 , description : 'zero todo' , done :false } ,
] ;
var v = logic . sortTodos ( a , function ( a , b ) { return a [ 'description' ] > b [ 'description' ] } ) ;
var b = [
{ id : - 2 , description : 'second todo' , done :true } ,
{ id : - 1 , description : 'third todo' , done :true } ,
{ id : 0 , description : 'zero todo' , done :false } ,
] ;
console . log ( a [ 0 ] [ 'description' ] + "\n" ) ;
console . log ( b [ 0 ] [ 'description' ] + "\n" ) ;
console . log ( v [ 0 ] [ 'description' ] + "\n" ) ;
t . deepEqual ( v , b , "33333333333sortTodos" ) ;
t . end ( ) ;
} ) ;
Delete console.logs.
Please fix indentation in the file.
Reactions are currently unavailable
You can’t perform that action at this time.
toDoApp/test.js
Line 24 in 3766fb0
toDoApp/test.js
Lines 70 to 89 in 3766fb0