fix tests

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-03-08 14:49:29 +01:00
parent b6dfc7dcd9
commit d36c697538
2 changed files with 10 additions and 0 deletions
@@ -261,6 +261,15 @@ describe('createRouter', () => {
});
});
describe('GET /v2/actions', () => {
it('lists available actions', async () => {
const response = await request(app).get('/v2/actions').send();
expect(response.status).toEqual(200);
expect(response.body[0].id).toBeDefined();
expect(response.body.length).toBeGreaterThan(8);
});
});
describe('POST /v2/tasks', () => {
it('rejects template values which do not match the template schema definition', async () => {
const response = await request(app)
@@ -39,6 +39,7 @@ const scaffolderApiMock: jest.Mocked<ScaffolderApi> = {
getIntegrationsList: jest.fn(),
getTask: jest.fn(),
streamLogs: jest.fn(),
listActions: jest.fn(),
};
const errorApiMock = { post: jest.fn(), error$: jest.fn() };