diff --git a/src/components/Header/index.spec.tsx b/src/components/Header/index.spec.tsx index 3e9a8e3..3ff3f40 100644 --- a/src/components/Header/index.spec.tsx +++ b/src/components/Header/index.spec.tsx @@ -1,10 +1,15 @@ +import { ChakraProvider } from '@chakra-ui/react'; import { render } from '@testing-library/react'; import React from 'react'; import { Header } from '..'; describe('Header', () => { test('rendering', () => { - const { container } = render(
); + const { container } = render( + +
+ + ); expect(container.innerHTML).toMatch('GitHub Language Stats'); }); diff --git a/src/components/StatsBody/index.spec.tsx b/src/components/StatsBody/index.spec.tsx index 39174cd..15ac500 100644 --- a/src/components/StatsBody/index.spec.tsx +++ b/src/components/StatsBody/index.spec.tsx @@ -1,3 +1,4 @@ +import { ChakraProvider } from '@chakra-ui/react'; import { render } from '@testing-library/react'; import React from 'react'; import StatsBody from '.'; @@ -5,7 +6,12 @@ import StatsBody from '.'; describe('StatsBody', () => { test('rendering', () => { const { container } = render( - + + + ); expect(container.innerHTML).toMatch('

test

test

'); diff --git a/src/components/StatsForm/index.spec.tsx b/src/components/StatsForm/index.spec.tsx index b1019a6..8cef164 100644 --- a/src/components/StatsForm/index.spec.tsx +++ b/src/components/StatsForm/index.spec.tsx @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { ChakraProvider } from '@chakra-ui/react'; import '@testing-library/jest-dom/extend-expect'; import { render, screen } from '@testing-library/react'; import React from 'react'; @@ -36,7 +37,11 @@ describe('StatsForm', () => { register: registerMock, formState: formStateMock, }; - render(); + render( + + + + ); }; test('renders StatsForm component', () => {