Files
habitica/test/api/v3
shalott 8c4f35daf4 Fixing test failure
This test seems to occasionally start failing (another coder reported the same thing happening to them in the blacksmiths’ guild) because the order in which the tasks are created can sometimes not match the order in the array. So I have sorted the tasks array after creation by the task name to ensure a consistent ordering, and slightly reordered the expect statements to match.
2016-11-16 21:52:23 +01:00
..
2016-11-16 21:52:23 +01:00
2016-05-23 13:58:31 +02:00

How to run tests:

  1. npm test is equivalent to gulp test:api-v3 which will run, in order, gulp lint, gulp test:api-v3:unit and gulp test:api-v3:integration. If one of these fails, the whole npm test command blocks and fails. Each of these commands can also be run as a standalone command.
  2. To run the server and the integrations tests in two different terminals (to better inspect the output in the server) run npm start in one and npm test:api-v3:integration:separate-server in the other