The plugin is tested end-to-end using Cypress.
The CI builds and serves the example Gatsby site in this repo, and runs the Cypress tests against it.
The example site sources images from real S3 buckets, so the tests cover the following cases:
- processing images with
sharp
and rendering withgatsby-image
- sourcing from multiple buckets (added in #14)
- sourcing from private buckets (added in #20, using a pre-signed URL)
- sourcing from a bucket with more than 1000 objects (added in #43, using a continuation token)
In total, the buckets hold 1502 objects, and the e2e tests assert that all are correctly sourced and rendered.
Read more about the example site's AWS setup in the example site's README.