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
and the main problem is that i don't know how to test if the data in {project[item.slug]?.heroTitle} is rendering (or if it's even posible). The hook useProjectsBySlugs gets the data from a slice of redux.
This is the hook:
import { ProjectSlugs } from "../types/Projects";
import { useSelector } from "react-redux";
import { AppState } from "../app/store";
import { selectProjectsBySlug } from "../features/projects/projectsSlice";
export function useProjectsBySlugs(slugs: ProjectSlugs[]) {
const projects = useSelector((state: AppState) => selectProjectsBySlug(state, slugs));
return projects;
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone, i'm currently learning testing with vitest, react-testing-library and MSW but i got stuck. I'm trying to test this component:
and the main problem is that i don't know how to test if the data in {project[item.slug]?.heroTitle} is rendering (or if it's even posible). The hook useProjectsBySlugs gets the data from a slice of redux.
This is the hook:
and this is the slice:
Beta Was this translation helpful? Give feedback.
All reactions