Repository navigation
test(storage-resize-images): fix the config-load error test - #3308
Merged
Merged
Conversation
…NT_FILTER_LEVEL An invalid SHARP_OPTIONS is now rejected when the module loads, so it no longer reaches the handler's error logging.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the expectLoggedAtError helper function in unhandled-error.test.ts to return the caught error, and updates a test case to assert on the specific error message when an invalid CONTENT_FILTER_LEVEL is provided. The feedback suggests refactoring expectLoggedAtError to be generic, which would improve type safety and preserve the specific error type being thrown.
IzaakGough
marked this pull request as ready for review
October 27, 2026 16:54
CorieW
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests for the resize images kit fail on
kits, which blocks every PR that touches the kit, including #3307.#3280 and #3281 merged together: #3280 rejects a bad
SHARP_OPTIONSat deploy, but a test from #3281 still uses one to cause a config error when an event runs.This uses an invalid
CONTENT_FILTER_LEVELinstead, which still fails during config loading in the handler, and checks the exact error message.Tested by running the kit test suite locally (276 passed). Not tested in CI yet.