Skip to content

Commit

Permalink
fix: remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
phatnguyenuit committed Jan 23, 2021
1 parent 3c7a98c commit f563786
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Asia/Ho_Chi_Minh"
timezoneMacos: "Asia/Ho_Chi_Minh"
timezoneWindows: "Asia/Ho_Chi_Minh"
# timezoneMacos: "Asia/Ho_Chi_Minh"
# timezoneWindows: "Asia/Ho_Chi_Minh"

- name: Run test coverage
run: yarn test --coverage
Expand Down
4 changes: 0 additions & 4 deletions src/components/weather/daily-weather/__test__/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import dayjs from 'dayjs';
import { DATE_FORMAT } from 'constants/common';
import * as utils from '../utils';
Expand All @@ -13,17 +12,14 @@ describe('formatDate', () => {
describe('computeDisplayDate', () => {
test('should return today', () => {
const today = dayjs();
console.log('today', today.format(DATE_FORMAT));
expect(utils.computeDisplayDate(today)).toEqual('Today');
});
test('should return tomorrow', () => {
const tomorrow = dayjs().add(1, 'day');
console.log('tomorrow', tomorrow.format(DATE_FORMAT));
expect(utils.computeDisplayDate(tomorrow)).toEqual('Tomorrow');
});
test('should return the formatted date', () => {
const next2DaysDate = dayjs().add(2, 'day');
console.log('next2DaysDate', next2DaysDate.format(DATE_FORMAT));
expect(utils.computeDisplayDate(next2DaysDate)).toEqual(
next2DaysDate.format(DATE_FORMAT),
);
Expand Down
2 changes: 0 additions & 2 deletions src/components/weather/daily-weather/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export const computeDisplayDate = (
tz = TIME_ZONE,
) => {
const givenDate = dayjs.tz(date, tz);
// eslint-disable-next-line no-console
console.log('givenDate', givenDate.format(DATE_FORMAT));
if (givenDate.isToday()) {
return 'Today';
}
Expand Down

1 comment on commit f563786

@vercel
Copy link

@vercel vercel bot commented on f563786 Jan 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.