Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c3024 committed Oct 17, 2024
1 parent d0aa14e commit 8771721
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/unit/ReportActionsUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,11 @@ describe('ReportActionsUtils', () => {
},
];

// Expected output should have the `CREATED` action at top
const expectedOutput: ReportAction[] = [input[1], ...input.slice(0, 1), ...input.slice(2)];

Check failure on line 306 in tests/unit/ReportActionsUtilsTest.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Prefer using the `.at()` method for array element access

Check failure on line 306 in tests/unit/ReportActionsUtilsTest.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Prefer using the `.at()` method for array element access

const result = ReportActionsUtils.getSortedReportActionsForDisplay(input);
expect(result).toStrictEqual(input);
expect(result).toStrictEqual(expectedOutput);
});

it('should filter out closed actions', () => {
Expand Down Expand Up @@ -392,9 +395,13 @@ describe('ReportActionsUtils', () => {
],
},
];

// Expected output should have the `CREATED` action at top
const expectedOutput: ReportAction[] = [input[1], ...input.slice(0, 1), ...input.slice(2)];

Check failure on line 400 in tests/unit/ReportActionsUtilsTest.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Prefer using the `.at()` method for array element access

Check failure on line 400 in tests/unit/ReportActionsUtilsTest.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Prefer using the `.at()` method for array element access

const result = ReportActionsUtils.getSortedReportActionsForDisplay(input);
input.pop();
expect(result).toStrictEqual(input);
expect(result).toStrictEqual(expectedOutput);
});

it('should filter out deleted, non-pending comments', () => {
Expand Down

0 comments on commit 8771721

Please sign in to comment.