Skip to content

Commit

Permalink
Make test data more realistic
Browse files Browse the repository at this point in the history
Signed-off-by: John Gomersall <[email protected]>
  • Loading branch information
john-gom committed Feb 12, 2025
1 parent 282964f commit 46b70b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/domain/services/scans.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ describe('create', () => {
scans_n: 7,
unique_scans_n: 3,
unique_scans_n_by_country: {
en: 3,
uk: 3,
world: 3,
},
},
'2024': {
scans_n: 10,
unique_scans_n: 7,
unique_scans_n_by_country: {
en: 2,
uk: 2,
fr: 5,
world: 7,
},
},
},
Expand All @@ -45,14 +47,14 @@ describe('create', () => {
unique_scans_n_by_country: {
ru: 1,
fr: 4,
world: 3,
world: 5,
},
},
},
});
const result =
await sql`SELECT * FROM product_scans_by_country WHERE product_id = (SELECT id from product where code = ${code1})`;
expect(result).toHaveLength(3);
expect(result).toHaveLength(5);
});
});
});

0 comments on commit 46b70b8

Please sign in to comment.