Yuta Okada
Yuta Okada
FYI, mocking with type error for mockGetDummyData, ```ts jest.mock("app/users/queries/getCurrentUser") const mockGetCurrentUser = getCurrentUser as jest.MockedFunction jest.mock("app/users/queries/getDummyData") const mockGetDummyData = getDummyData as jest.MockedFunction mockGetDummyData._resolverType = "query" mockGetDummyData._routePath = "foo" ``` And...
I'm guessing when `queryFn` is mocked like the above, then `_routePath` is gone and two or more `useQuery`s will return the same value. https://github.com/blitz-js/blitz/blob/ad71e15290b4133a5431236c3d5ce0666486a61f/nextjs/packages/next/data-client/react-query-utils.ts#L125
I think the better way is here, ```ts jest.mock("app/users/queries/getCurrentUser", () => { const resolver = jest.fn() as any resolver._resolverType = "query" resolver._routePath = "app/users/queries/getCurrentUser" return resolver }) const mockGetCurrentUser =...
I found a temporary solution by using custom className. ``` const useCustomStyles = makeStyles((theme) => ({ "my-MuiCollapse-container": { pointerEvents: "all", marginTop: "6px", marginBottom: "6px", } }) ``` and ``` {children}...
Does anyone collect the coverage of playwright component testing with `babel-plugin-istanbul`? It doesn't collect the coverage in my local using `vite` + `vite-plugin-istanbul` + `playwright-ct`. (FYI: the normal playwright works...
> Does anyone collect the coverage of playwright component testing with `babel-plugin-istanbul`? > > It doesn't collect the coverage in my local using `vite` + `vite-plugin-istanbul` + `playwright-ct`. (FYI: the...