test: add tests for executions

This commit is contained in:
Jakub P.
2024-12-10 21:03:23 +01:00
parent feba2a32f9
commit 0012c9fb59
12 changed files with 443 additions and 45 deletions

View File

@@ -0,0 +1,15 @@
const { expect } = require('../fixtures/index');
export const getToken = async (apiRequest) => {
const tokenResponse = await apiRequest.post(
`http://localhost:${process.env.PORT}/api/v1/access-tokens`,
{
data: {
email: process.env.LOGIN_EMAIL,
password: process.env.LOGIN_PASSWORD,
},
}
);
await expect(tokenResponse.status()).toBe(200);
return await tokenResponse.json();
};