expect.extend({ toBeInTheDocument, toHaveStyle }); code example
Example: "@testing-library/jest-dom"
npm install --save-dev @testing-library/jest-dom
// or
yarn add --dev @testing-library/jest-dom
npm install --save-dev @testing-library/jest-dom
// or
yarn add --dev @testing-library/jest-dom