Skip to content

Commit

Permalink
improvements to the mocker
Browse files Browse the repository at this point in the history
  • Loading branch information
prc5 committed Jan 20, 2025
1 parent c553023 commit bd7fcb6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/core/__tests__/features/mocker/mocker.base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("Mocker [ Base ]", () => {
data: fixture,
status: 200,
}),
{ responseTime: 1500, timeout: true },
{ responseTime: 150, timeout: true },
);

const response = await mockedRequest.send({});
Expand All @@ -100,7 +100,7 @@ describe("Mocker [ Base ]", () => {
status: 200,
}),
{
responseTime: 1500,
responseTime: 150,
},
);
const secondRequest = client
Expand All @@ -111,7 +111,7 @@ describe("Mocker [ Base ]", () => {
status: 200,
}),
{
responseTime: 1500,
responseTime: 150,
},
);

Expand Down Expand Up @@ -357,12 +357,12 @@ describe("Mocker [ Base ]", () => {
data: fixture,
status: 200,
}),
{ requestTime: 1000, responseTime: 1000 },
{ requestTime: 100, responseTime: 100 },
);
const startDate = +new Date();
const response = await mockedRequest.send({});
const endDate = +new Date();
expect(endDate - startDate).toBeGreaterThanOrEqual(2000);
expect(endDate - startDate).toBeGreaterThanOrEqual(200);
expect(response).toStrictEqual({
data: fixture,
error: null,
Expand Down

0 comments on commit bd7fcb6

Please sign in to comment.