-
Notifications
You must be signed in to change notification settings - Fork 483
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
feat(@clayui/empty-state): Output a reduced motion image by default #5640
Conversation
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.
@pat270 I added some comments about some things we can change.
I'm not sure what statements, lines, and functions mean.
Oh yeah, basically the tests aren't covering all the edge cases that exist, for example if a test case created to test the behavior of the component didn't pass a condition, it called a function or line in that path that decreased the coverage percentage of the component test.
You can run yarn test --coverage
to get the coverage of the tests, a folder is created in the root of Clay with a minimal static website that you can use to browse and track coverage and check which lines or conditions of code do not are covered by tests.
@matuzalemsteles I've been trying to test |
@pat270 no problem, we can decrease the coverage limit, you can edit the value by changing it in the |
: `https://${location.host}` | ||
); | ||
|
||
const index = url.pathname.match(/.(gif|png| jpeg|jpg)/)?.index; |
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.
@pat270 just to avoid use cases where the URL has a link to the image but doesn't have the file extension, we can return null instead of still trying to infer the URL.
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.
LGTM
fixes #5638
@matuzalemsteles I didn't update the tests yet. I'm having trouble writing it for:
I'm not sure what statements, lines, and functions mean.