Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Sep 30, 2022
1 parent e94ab3d commit ffb335b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ describe("useMotionTemplate", () => {
return <motion.div style={{ transform }} />
}

const { container } = render(<Component />)
const { container, rerender } = render(<Component />)
rerender(<Component />)
const { firstChild } = container

return new Promise<void>((resolve) => {
setTimeout(() => {
requestAnimationFrame(() => {
expect(firstChild).toHaveStyle(
`transform: translateX(10px) translateY(2px)`
)
resolve()
}, 50)
})
})
})

Expand Down

0 comments on commit ffb335b

Please sign in to comment.