Skip to content

Commit

Permalink
test: fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Sep 22, 2023
1 parent 38b8ffe commit a66b900
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/api/bodies-listing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ describe('Bodies list', () => {
const user = await generator.createUser();
const token = await generator.createAccessToken(user);

await generator.createBody();
const body = await generator.createBody();
await generator.createBody();
// Adding name to make sure sorting is correct
await generator.createBody({ name: 'AAA' });
const body = await generator.createBody({ name: 'BBB' });
await generator.createBody({ name: 'CCC' });

const res = await request({
uri: '/bodies?limit=1&offset=1', // second one should be returned
Expand Down

0 comments on commit a66b900

Please sign in to comment.