Skip to content

Commit

Permalink
chore: add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Dec 24, 2023
1 parent d971430 commit 4ca214a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/e2e/get_vp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,21 @@ describe('getVp', () => {
});
});

describe('when the strategies are invalid', () => {
it.each([
['no strategies', null],
['empty strategies', []],
['too many strategies', Array(12).fill({ name: 'test', param: 'a' })]
])('returns a 400 error on %s', async (title, strategies) => {
const response = await request(process.env.HOST).post('/').send({
method: 'get_vp',
address: '0x662a9706c7122D620D410ba565CAfaB29e4CB47f',
strategies
});

expect(response.status).toEqual(400);
});
});

it.todo('returns the voting power');
});

0 comments on commit 4ca214a

Please sign in to comment.