Skip to content

Conversation

@jasonbahl
Copy link
Collaborator

What does this implement/fix? Explain your changes.

This adds tests for the PR #3214

Does this close any currently open issues?

n/a

- tests querying the sourceUrl field and fileSize field on Media Item with various size arguments
- unit tests the testGetSourceUrlBySize function
@jasonbahl jasonbahl requested a review from justlevine October 29, 2024 16:27
@jasonbahl jasonbahl self-assigned this Oct 29, 2024
@jasonbahl jasonbahl added the scope: tests Developing unit tests, integration tests, and ensuring coverage label Oct 29, 2024
- add image file that was not included in the previous commit
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 5b3e0dd and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link

Coverage Status

coverage: 83.966% (+0.01%) from 83.953%
when pulling 5b3e0dd on jasonbahl:fix/lazy-load-sizes-tests
into 6f28681 on wp-graphql:develop.

Copy link
Collaborator

@justlevine justlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the coveralls and the test contents, this is probably good enough.

Two potential cases to add - your call if they're worth it.

  • That our default size is the same one as the explicit one
  • That a custom registered size works as expected (e.g. a product_thumb or a size slug woo uses IRL)

@jasonbahl jasonbahl merged commit 44fa51f into wp-graphql:develop Nov 8, 2024
30 checks passed
@jasonbahl jasonbahl mentioned this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tests Developing unit tests, integration tests, and ensuring coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants