Skip to content

Commit

Permalink
fix: add more data points to make test specific
Browse files Browse the repository at this point in the history
  • Loading branch information
dagmawig committed Mar 31, 2022
1 parent 370717f commit e73dd06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
17 changes: 7 additions & 10 deletions __tests__/e2e/countries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,16 @@ describe('', () => {
it('countries/v2/leaderboard', async () => {
const response = await seed
.clear()
.then(
async () =>
seed
.seed()
.then(
async () => supertest(app).get('/countries/v2/leaderboard'),
),
.then(async () =>
seed
.seed()
.then(async () => supertest(app).get('/countries/v2/leaderboard')),
);
expect(response.status).toBe(200);
expect(response.body.countries[0]).toMatchObject({
id: expect.any(Number),
name: expect.any(String),
planted: expect.any(String),
id: 6632357,
name: 'United States',
planted: '2',
centroid: expect.stringMatching(/coordinates/),
});
await seed.clear();
Expand Down
10 changes: 10 additions & 0 deletions __tests__/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ const dataRawCaptureFeature = [
created_at: new Date().toUTCString(),
updated_at: new Date().toUTCString(),
},
{
id: uuid.v4(),
lat: '40.50414585511928',
lon: '-75.66275380279951',
location: '0101000020E6100000B514ED8E6AEA52C05D13F4D987C04440',
field_user_id: 5127,
field_username: 'test',
created_at: new Date().toUTCString(),
updated_at: new Date().toUTCString(),
},
{
id: uuid.v4(),
lat: '57.57641356164619',
Expand Down

0 comments on commit e73dd06

Please sign in to comment.