mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
tests: Increase timeouts instead of disabling them (#10367)
Some tests were disabled inba799c67f9and10567d81e2, because they tend to frequently time out after 8 seconds. Instead of disabling the tests (which IMHO is bad, because tests are there for a reason), we're now increasing the timeout to 30 seconds just for these tests. As requested by @paglias, I've marked the timeout functions with a @TODO comment, so that the slow tests or the functionality they're testing are eventually refactored. I also needed to change the arrow notation for the test cases to use the function keyword, because otherwise we don't have this.timeout() available. Signed-off-by: aszlig <aszlig@nix.build> Cc: @paglias
This commit is contained in:
@@ -123,8 +123,8 @@ describe('GET /challenges/:challengeId/members', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// @TODO times out too many times (when it takes more than 8s)
|
it('supports using req.query.lastId to get more members', async function () {
|
||||||
xit('supports using req.query.lastId to get more members', async () => {
|
this.timeout(30000); // @TODO: times out after 8 seconds
|
||||||
let group = await generateGroup(user, {type: 'party', name: generateUUID()});
|
let group = await generateGroup(user, {type: 'party', name: generateUUID()});
|
||||||
let challenge = await generateChallenge(user, group);
|
let challenge = await generateChallenge(user, group);
|
||||||
|
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ describe('GET /groups/:groupId/members', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// @TODO times out too many times (when it takes more than 8s)
|
it('supports using req.query.lastId to get more members', async function () {
|
||||||
xit('supports using req.query.lastId to get more members', async () => {
|
this.timeout(30000); // @TODO: times out after 8 seconds
|
||||||
let leader = await generateUser({balance: 4});
|
let leader = await generateUser({balance: 4});
|
||||||
let group = await generateGroup(leader, {type: 'guild', privacy: 'public', name: generateUUID()});
|
let group = await generateGroup(leader, {type: 'guild', privacy: 'public', name: generateUUID()});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user