Skip to content

Commit

Permalink
chore: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
WillianAgostini committed Dec 24, 2023
1 parent 0ef9797 commit d099675
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
30 changes: 15 additions & 15 deletions e2e/__tests__/__snapshots__/testRetries.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,39 @@ PASS __tests__/logErrorsBeforeRetries.test.js
✓ retryTimes set"
`;

exports[`Test Retries logs error(s) before retry 2`] = `
exports[`Test Retries logs error(s) before retry with fake timers 1`] = `
"LOGGING RETRY ERRORS retryTimes set with fake timers
RETRY 1
expect(received).toBeFalsy()
Received: true
18 | );
19 | } else {
> 20 | expect(true).toBeFalsy();
16 | expect(new Date().getTime() - startTimeInSeconds).toBeGreaterThan(200);
17 | } else {
> 18 | expect(true).toBeFalsy();
| ^
21 | jest.runAllTimers();
22 | }
23 | });
19 | jest.runAllTimers();
20 | }
21 | });
at Object.toBeFalsy (__tests__/logErrorsBeforeRetriesFakeTimers.test.js:20:18)
at Object.toBeFalsy (__tests__/logErrorsBeforeRetriesFakeTimers.test.js:18:18)
RETRY 2
expect(received).toBeFalsy()
Received: true
18 | );
19 | } else {
> 20 | expect(true).toBeFalsy();
16 | expect(new Date().getTime() - startTimeInSeconds).toBeGreaterThan(200);
17 | } else {
> 18 | expect(true).toBeFalsy();
| ^
21 | jest.runAllTimers();
22 | }
23 | });
19 | jest.runAllTimers();
20 | }
21 | });
at Object.toBeFalsy (__tests__/logErrorsBeforeRetriesFakeTimers.test.js:20:18)
at Object.toBeFalsy (__tests__/logErrorsBeforeRetriesFakeTimers.test.js:18:18)
PASS __tests__/logErrorsBeforeRetriesFakeTimers.test.js
✓ retryTimes set with fake timers"
Expand Down
6 changes: 4 additions & 2 deletions e2e/__tests__/testRetries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ describe('Test Retries', () => {
expect(extractSummary(result.stderr).rest).toMatchSnapshot();
});

it('logs error(s) before retry', () => {
const result = runJest('test-retries', ['logErrorsBeforeRetriesFakeTimers.test.js']);
it('logs error(s) before retry with fake timers', () => {
const result = runJest('test-retries', [
'logErrorsBeforeRetriesFakeTimers.test.js',
]);
expect(result.exitCode).toBe(0);
expect(result.failed).toBe(false);
expect(result.stderr).toContain(logErrorsBeforeRetryErrorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ it('retryTimes set with fake timers', () => {
jest.useFakeTimers();
i++;
if (i === 3) {
expect(new Date().getTime() - startTimeInSeconds).toBeGreaterThan(
200,
);
expect(new Date().getTime() - startTimeInSeconds).toBeGreaterThan(200);
} else {
expect(true).toBeFalsy();
jest.runAllTimers();
Expand Down

0 comments on commit d099675

Please sign in to comment.