-
Notifications
You must be signed in to change notification settings - Fork 10.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
test: enable integation tests for image sharp #11567
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.
This is looking awesome! Wish there were some way we could move off of all the hard-coded paths (because this really won't be resilient to changes if we make any changes--but maybe that's OK?), but beyond that--the functionality seems solid!
One comment on the above: maybe we could readdir
on public/static/image-hash
and then ensure there are X images rather than checking each image directly?
integration-tests/gatsby-pipeline/__tests__/lazy-image-build/develop.js
Outdated
Show resolved
Hide resolved
integration-tests/gatsby-pipeline/__tests__/lazy-image-build/develop.js
Outdated
Show resolved
Hide resolved
this is probably more maintainable 👍 |
@wardpeet heads up I fixed the CircleCI config errors. Super helpful to use the
|
Sweet thanks a bunch! I'm on a linux vm now so I'm using apt-get but I saw that homebrew is now also available on linux |
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.
Left some comments; great work!
This is pretty much good to go!
@@ -1,12 +1,19 @@ | |||
const glob = require(`glob`) | |||
|
|||
const pkgs = glob |
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.
Merely an alternate approach--both work well here!
const roots = glob
.sync(`*/`, {
cwd: path.join(process.cwd(), `integration-tests`),
})
.map(testPath => `<rootDir>/integration-tests/${testPath}`)
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 probably want to replace process.cwd()
with __dirname
?
I copied this from the base config 😛 i'll update in another pr and take the other jest.config with it
Co-Authored-By: wardpeet <ward@coding-tech.com>
* test: enable integration tests for image sharp
* test: enable integration tests for image sharp
Description
Adding some integration tests for our lazy builds setup. It's primarily going to be used to validate #10964. And probably more issues that we need to validate on a real run instead of just testing the functions separately.
Related Issues
#10964, #7348, #10815