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', () => { diff --git a/yarn.lock b/yarn.lock index fb2d8c6..5acbb6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -474,12 +474,12 @@ integrity sha512-l5QdBgwrAg3Sc2BRqtNkJpfuLw/pWRDwwT58J6c4PqQT6wzXxyNa8Q0PForu1ltB5qEiFb1kxr/F/HO1EwNa6g== "@chakra-ui/react@^2.4.4": - version "2.10.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.10.2.tgz#9fc718ab809d8a8003a8c688b2b6fda44f63741a" - integrity sha512-TfIHTqTlxTHYJZBtpiR5EZasPUrLYKJxdbHkdOJb5G1OQ+2c5kKl5XA7c2pMtsEptzb7KxAAIB62t3hxdfWp1w== + version "2.10.3" + resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.10.3.tgz#8595658890a9558de7eec1a854cb959fc6352e29" + integrity sha512-oWmGGzzKWBfoB3hrrQxWwFirlxJXGdk3v4SLnLPPYRy9IMibmQM5rAUJ/NxZum1mrYGP5lo7DHcIWDfV2A3ubw== dependencies: "@chakra-ui/hooks" "2.4.2" - "@chakra-ui/styled-system" "2.11.2" + "@chakra-ui/styled-system" "2.12.0" "@chakra-ui/theme" "3.4.6" "@chakra-ui/utils" "2.2.2" "@popperjs/core" "^2.11.8" @@ -489,10 +489,10 @@ react-focus-lock "^2.9.6" react-remove-scroll "^2.5.7" -"@chakra-ui/styled-system@2.11.2": - version "2.11.2" - resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.11.2.tgz#2c0da4653b6b8b6a75ab7362d4d5ca208324747a" - integrity sha512-y++z2Uop+hjfZX9mbH88F1ikazPv32asD2er56zMJBemUAzweXnHTpiCQbluEDSUDhqmghVZAdb+5L4XLbsRxA== +"@chakra-ui/styled-system@2.12.0": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.12.0.tgz#72ad933bf11abd37c43086a3cb710e683a08ebc2" + integrity sha512-zoqLw1I2y4GlZ0LDoyw8o0JjoDOW6u0IwFPAoHuw0UMbP8glHUGvwEL1STug/i/GzBKw83yoF6ae41HIQvhMww== dependencies: "@chakra-ui/utils" "2.2.2" csstype "^3.1.2" @@ -5671,9 +5671,9 @@ tslib@^1.8.1: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" - integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== + version "2.8.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b" + integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== tslib@^2.3.1, tslib@^2.4.0: version "2.5.2"