Skip to content

Commit

Permalink
fix: remove extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kpoke committed Jun 24, 2022
1 parent caa9651 commit 6ae7886
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions server/repositories/StakeholderRepository.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,6 @@ describe('StakeholderRepository', () => {
mockKnex.unmock(knex);
});

it('getStakeholderTreeById', async () => {
tracker.uninstall();
tracker.install();
tracker.on('query', (query, step) => {
const stakeholder = { id: 1 };
const count = { count: 1 };
[
function firstQuery() {
const bool = query.sql.match(/select.*.*id.*/);
expect(bool);
query.response(stakeholder);
},
function firstQuery() {
const bool = query.sql.match(/select.*.*id.*/);
expect(bool);
query.response([]);
},
function firstQuery() {
const bool = query.sql.match(/select.*.*id.*/);
expect(bool);
query.response([]);
},
function secondQuery() {
const bool = query.sql.match(/count.*.*id.*/);
expect(bool);
query.response([count]);
},
function finalQuery() {
query.response({ stakeholders: [stakeholder], count });
},
][step - 1]();
});

const { stakeholders, count } =
await stakeholderRepository.getStakeholderTreeById(1);
expect(stakeholders[0]).property('id').eq(1);
expect(count).eq(1);
});

it('getStakeholderByOrganizationId', async () => {
tracker.uninstall();
tracker.install();
Expand Down

0 comments on commit 6ae7886

Please sign in to comment.