Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test file #18

Open
jema28 opened this issue Jun 27, 2019 · 1 comment
Open

Test file #18

jema28 opened this issue Jun 27, 2019 · 1 comment

Comments

@jema28
Copy link

jema28 commented Jun 27, 2019

  1. Please write helpful messages in the test: change "xd" and "33333333333sortTodos" in each test.
    t.deepEqual(actual,expected,"xd");
  2. Why are you doing logic in the test? And what do v and b mean? Please make sure you're writing semantically.

    toDoApp/test.js

    Lines 70 to 89 in 3766fb0

    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();
    });
  3. Delete console.logs.
  4. Please fix indentation in the file.
@enasmtour
Copy link
Collaborator

done @jema28

enasmtour added a commit that referenced this issue Jun 27, 2019
YousefQawasmeh added a commit that referenced this issue Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants