Skip to content

Commit

Permalink
Changing prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Jan 7, 2022
1 parent 13a4bc4 commit 1ea3c2b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/components/MotionConfig/__tests__/index.test.tsx
@@ -0,0 +1,20 @@
import { render } from "../../../../jest.setup"
import { motion } from "../../../render/dom/motion"
import { MotionConfig } from "../"
import * as React from "react"

describe("custom properties", () => {
test("renders", () => {
const Component = () => {
return (
<MotionConfig isValidProp={(key) => key !== "data-foo"}>
<motion.div data-foo="bar" />
</MotionConfig>
)
}

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

expect(container.firstChild).not.toHaveAttribute("data-foo")
})
})

0 comments on commit 1ea3c2b

Please sign in to comment.