-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] 컴포넌트 테스트에서 act console.error 발생하는 이슈를 수정하라
- 컴포넌트 관련 테스트에서 react-query hooks로 인해 act console.error 발생 - react-query hooks를 jest mocking - dynamic import 전역 mocking 추가 - 추후 msw로 변경
- Loading branch information
1 parent
6bce4ec
commit bc5e8d6
Showing
8 changed files
with
162 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
PropsWithChildren, ReactElement, useMemo, | ||
} from 'react'; | ||
import { Context as ResponsiveContext } from 'react-responsive'; | ||
|
||
interface Props { | ||
width?: number; | ||
} | ||
|
||
function InjectResponsiveContext({ | ||
width = 700, children, | ||
}: PropsWithChildren<Props>): ReactElement { | ||
const value = useMemo(() => ({ width }), []); | ||
|
||
return ( | ||
<ResponsiveContext.Provider value={value}> | ||
{children} | ||
</ResponsiveContext.Provider> | ||
); | ||
} | ||
|
||
export default InjectResponsiveContext; |