Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Migrate 'OptionsListUtilsTest.js', 'DateUtilsTest.js', 'SidebarLinks.perf-test.js', 'markdown.js' and 'ReportUtilsTest.js' to Typescript #37206

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
79d9495
refactor(typescript): migrate multiple tests and utils
pac-guerreiro Feb 26, 2024
1b2af89
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Feb 26, 2024
0bd0ce5
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Feb 28, 2024
c66339c
refactor(typescript): apply pull request suggestions
pac-guerreiro Feb 29, 2024
947c99f
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Feb 29, 2024
2a76abb
refactor(typescript): resolve type error
pac-guerreiro Feb 29, 2024
76f4e2e
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 11, 2024
a5131ed
refactor(typescript): resolve type issues
pac-guerreiro Mar 12, 2024
d78e9d1
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 13, 2024
e5d3ef0
fix: wrong data type conversion
pac-guerreiro Mar 13, 2024
16854a9
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 14, 2024
c5b2ada
refactor(typescript): apply pull request suggestions
pac-guerreiro Mar 14, 2024
104f838
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 18, 2024
f051c2e
refactor(typescript): apply pull request suggestion
pac-guerreiro Mar 18, 2024
3e40a53
refactor(typescript): apply pull request feedback
pac-guerreiro Mar 20, 2024
5685095
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 22, 2024
ba09987
refactor(typescript): apply pull request suggestion
pac-guerreiro Mar 22, 2024
9ab0ea3
refactor(typescript): apply pull request feedback
pac-guerreiro Mar 22, 2024
dc6ede9
Merge branch 'main' into pac-guerreiro/refactor/migrate-25309-25310-2…
pac-guerreiro Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libs/DateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function formatToLongDateWithWeekday(datetime: string | Date): string {
*
* @returns Sunday
*/
function formatToDayOfWeek(datetime: string | Date): string {
function formatToDayOfWeek(datetime: Date): string {
return format(new Date(datetime), CONST.DATE.WEEKDAY_TIME_FORMAT);
pac-guerreiro marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DateUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('DateUtils', () => {
});

it('formatToDayOfWeek should return a weekday', () => {
const weekDay = DateUtils.formatToDayOfWeek(datetime);
const weekDay = DateUtils.formatToDayOfWeek(new Date(datetime));
expect(weekDay).toBe('Monday');
});
it('formatToLocalTime should return a date in a local format', () => {
Expand Down
Loading