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 not testing what is intended in radix-sort.spec.js #39

Open
Pier-LucPicard opened this issue Oct 19, 2018 · 0 comments
Open

Test not testing what is intended in radix-sort.spec.js #39

Pier-LucPicard opened this issue Oct 19, 2018 · 0 comments

Comments

@Pier-LucPicard
Copy link

Just a head up.

in test /tests/sorting/radix-sort.spec.js
If you use this construction:

    let array = Array(1000000).map(() => {
      return parseInt((Math.random() * 1000000000), 10);
    });

Like in test

 it('should work with large arrays', function() {
    this.timeout(3000);
    let array = Array(1000000).map(() => {
      return parseInt((Math.random() * 1000000000), 10);
    });
    expect(sort(array)).to.be.sorted();
  });

This returns an empty array of length 1000000 but not initialised. Therefore, it try to sort an empty array instead of an array of random integer values.

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

1 participant