mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
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.
How to run tests:
npm testis equivalent togulp test:api-v3which will run, in order,gulp lint,gulp test:api-v3:unitandgulp test:api-v3:integration. If one of these fails, the wholenpm testcommand blocks and fails. Each of these commands can also be run as a standalone command.- To run the server and the integrations tests in two different terminals (to better inspect the output in the server) run
npm startin one andnpm test:api-v3:integration:separate-serverin the other