Add basic unit test for the Title component

This commit is contained in:
abhijitXD
2020-10-01 15:36:24 +05:30
parent 3f05970642
commit 1f5aa89161
2 changed files with 43 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import React from "react"
import renderer from "react-test-renderer"
import Title from "../title"
describe("Title", () => {
it("renders correctly", () => {
const tree = renderer
.create(<Title prefix={{ title: "Hi 👋, I'm" }} data={{ title: "" }} />)
.toJSON()
expect(tree).toMatchSnapshot()
})
})