algorithms-exercises icon indicating copy to clipboard operation
algorithms-exercises copied to clipboard

Tests cannot be nested, jest complaninig locally

Open muzhaqi16 opened this issue 3 years ago • 0 comments

https://github.com/btholt/algorithms-exercises/blob/5b2edb0bc08e033d552ea7f9c891d02b49863aa0/specs/graph/graph.test.js#L34

I do receive this error message when trying to run the tests locally.

FAIL specs/graph/graph.test.js ● extra credit

 Tests cannot be nested. Test "user 1 with 7 degrees of separation – this will traverse every user that's followed by someone else. five users are unfollowed" cannot run because it is nested within "extra credit".

  73 |
  74 | test("extra credit", function () {
> 75 |   test("user 1 with 7 degrees of separation – this will traverse every user that's followed by someone else. five users are unfollowed", () => {
     |   ^
  76 |     expect(findMostCommonTitle(1, 7)).toBe("Geological Engineer");
  77 |   });
  78 | });

  at Env.it (node_modules/jest-jasmine2/build/jasmine/Env.js:605:19)
  at Object.<anonymous> (specs/graph/graph.test.js:75:3)`

I had to change the outer test to describe

muzhaqi16 avatar May 16 '22 11:05 muzhaqi16