Skip to content
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

fix: skip caching empty resources #458

Merged

Conversation

wwilsman
Copy link
Contributor

@wwilsman wwilsman commented Jan 21, 2020

Purpose

Builds onto #437 by adding tests

Approach

Added a unit test for this since our acceptance tests might be a little flakey due to slow startup times.

This suite was adjusted to account for now requiring a couple other response methods.

Also in this test suite, I replaced instances of () { return 'foo' } with () => 'foo' except where we explicitly need to reference this.


Skipped a live site test due to the response being very slow. We have a ticket to remove (and replace if necessary) these live tests, but that should be in another PR. Skipping the failing one for now rather than increasing the timeout to 20 seconds.

blake-newman and others added 2 commits January 21, 2020 12:30
skip caching empty resources (browser resource hints)
Copy link
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

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

🏁 We should totally tackle the live sites ticket soon

@@ -78,7 +78,7 @@ describe('Integration test', () => {
expect(domSnapshot).contains('badssl.com')
})

it('snapshots a complex website with responsive images', async () => {
it.skip('snapshots a complex website with responsive images', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can just delete this test tbh. We have a responsive image test further down that isn't a live site.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💯

We have a locally controlled test for responsive images, the live sites only
cause pain since we cannot maintain them.
@wwilsman wwilsman force-pushed the blake-newman-blake.newman/skip-caching-empty-resources branch from 349a2b1 to fc7f908 Compare January 21, 2020 22:10
@wwilsman wwilsman merged commit c2cb769 into master Jan 21, 2020
@wwilsman wwilsman deleted the blake-newman-blake.newman/skip-caching-empty-resources branch January 21, 2020 22:26
djones pushed a commit that referenced this pull request Jan 21, 2020
## [0.20.12](v0.20.11...v0.20.12) (2020-01-21)

### Bug Fixes

* skip caching empty resources ([#458](#458)) ([c2cb769](c2cb769))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants