-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEQ]Yaswanth/FEQ-1974_Added test cases for sidenote component #137
[FEQ]Yaswanth/FEQ-1974_Added test cases for sidenote component #137
Conversation
it("renders children and title correctly", () => { | ||
const { getByText } = render( | ||
<SideNote title="Title"> | ||
<div>Child content</div> | ||
</SideNote> | ||
); | ||
expect(getByText("Title")).toBeInTheDocument(); | ||
expect(getByText("Child content")).toBeInTheDocument(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain variables such as title
is being repeated and I suggest to define them in a beforeEach
and reuse them in different tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't use it in the beforeEach method because I've been using queryByText, getByText, and queryByTestId for specific cases.
🎉 This PR is included in version 1.12.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Added test cases for side note component in deriv-com/ui library