Skip to content

Commit

Permalink
Change report to beforeAll Afterall
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithriel committed Nov 15, 2023
1 parent b4b6432 commit 09efab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/routes/report/report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('/reports/{REPORTID}', () => {
let totalReports;
let reportDualProj;

beforeEach(async () => {
beforeAll(async () => {
// Get genomic template
const template = await db.models.template.findOne({where: {name: 'genomic'}});
// Create Report and associate projects
Expand Down Expand Up @@ -257,7 +257,7 @@ describe('/reports/{REPORTID}', () => {
.expect(HTTP_STATUS.OK);

checkReports(res.body.reports);
expect(res.body.reports.length).toBe(2);
expect(res.body.reports.length).toBe(3);
}, LONGER_TIMEOUT);

test('/ - offset - 400 Bad Request', async () => {
Expand Down Expand Up @@ -549,7 +549,7 @@ describe('/reports/{REPORTID}', () => {
});

// delete report
afterEach(async () => {
afterAll(async () => {
await db.models.report.destroy({where: {id: report.id}, force: true});
await db.models.report.destroy({where: {id: reportReady.id}, force: true});
await db.models.report.destroy({where: {id: reportReviewed.id}, force: true});
Expand Down

0 comments on commit 09efab2

Please sign in to comment.