fix: unit test missing dayjs extend

This commit is contained in:
phamhieu authored and Hieu Pham committed 2022-05-18 20:14:20 +07:00
1 parent 899b70dbc1
commit 52ecddc554
2 files changed
+11 -1

No files matched your search

@@ -1,5 +1,10 @@
import LogEventChart from 'components/interfaces/Settings/Logs/LogEventChart'
import { render, waitFor, screen } from '@testing-library/react'
import { render, screen } from '@testing-library/react'
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
dayjs.extend(utc)
jest.mock('components/ui/Flag/Flag')
import Flag from 'components/ui/Flag/Flag'
@@ -1,3 +1,8 @@
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
dayjs.extend(utc)
// mock the fetch function
jest.mock('lib/common/fetch')
import { get } from 'lib/common/fetch'