Skip to content

Commit

Permalink
Fix: Sorting of dates using Date object
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanu-02 committed Jan 5, 2025
1 parent c131f5d commit f142ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __tests__/extension-requests/extension-requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ describe('Tests the Extension Requests Screen', () => {
requestDaysArray.push(requestedDays.slice(5));
}

const sortedRequestDaysArray = [...requestDaysArray].sort();
const sortedRequestDaysArray = [...requestDaysArray].sort((a, b) => new Date(a) - new Date(b));

expect(requestDaysArray).toEqual(sortedRequestDaysArray);
});
Expand Down

0 comments on commit f142ef6

Please sign in to comment.