-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Added card_width argument to gist card #3467
Conversation
@yaten2302 is attempting to deploy a commit to the github readme stats Team on Vercel. A member of the Team first needs to authorize it. |
tests/renderGistCard.test.js
Outdated
expect(document.querySelector("svg")).toHaveAttribute("width", "400"); | ||
}); | ||
|
||
it("should render with custom width set and limit minimum width", () => { |
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.
You are performing the same test multiple times. Please consider replacing it with:
it("should render with custom width set", () => {
document.body.innerHTML = renderGistCard(data);
expect(document.querySelector("svg")).toHaveAttribute("width", "400");
document.body.innerHTML = renderGistCard(data, { card_width: 400 });
expect(document.querySelector("svg")).toHaveAttribute("width", "400");
});
it("should limit minimum width when the custom width is too small", () => {
document.body.innerHTML = renderGistCard(data, { card_width: 1 });
expect(document.querySelector("svg")).toHaveAttribute("width", "280");
});
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.
@yaten2302, thanks for applying the changes I requested. I made some small last suggestions that should be used, and then the PR is ready for merge 🚀.
Co-authored-by: Rick Staa <rick.staa@outlook.com>
@rickstaa, made the changes, could you please review 👍 |
@rickstaa, I've created a new PR for adding the
card_width
argument to the gist card, since there were some issues in the previous one.Could you also please check that if the changes made in the test file are correct?