You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{expect,test}from"vitest";import{render,screen}from"@testing-library/react";importmatchersfrom"@testing-library/jest-dom/matchers";importHeaderfrom"@/components/Header";expect.extend(matchers);test("Home",()=>{render(<Header/>);
// find a roleconstcolorButton=screen.getByRole("button",{name: "Change to blue"});// button's color is redexpect(colorButton).toHaveStyle({backgroundColor: "rgb(255, 0, 0)"});});
What shoud I do ? please help !
The text was updated successfully, but these errors were encountered:
now I am studying with Next.js 13 and vitest, but there is an error in the toHaveStyle part.
Since I use css modules when applying css, I tried npm test by applying css modules to the button, but it doesn't work normally.
I googled and set vitest.config.ts, but it doesn't work normally. Is there any solution?
What shoud I do ? please help !
The text was updated successfully, but these errors were encountered: