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

Apply middleware before all served assets. #1785

Merged
merged 2 commits into from Apr 12, 2024

Conversation

brettburley
Copy link
Contributor

@brettburley brettburley commented Apr 11, 2024

This enables configured middleware to apply to all served assets, including those served from the public/testem folder.

This is intended to address #1784.

This enables configured middleware to apply to all served assets, including those
served from the public/testem folder.
@brettburley brettburley marked this pull request as ready for review April 11, 2024 18:59
@johanneswuerbach
Copy link
Member

Hey, thanks for the contribution. Would you mind to add a test here https://github.com/testem/testem/blob/master/tests/server_tests.js#L116 that ensures we don't regress? Maybe use a static middleware that adds an additional response header to all responses and check that is added on static files?

@brettburley
Copy link
Contributor Author

Thanks, good call! I went ahead and added test assertions for the middleware to all of the request types where middleware should be applied. Let me know if you have any feedback.

@johanneswuerbach johanneswuerbach merged commit 72c3314 into testem:master Apr 12, 2024
8 checks passed
@johanneswuerbach
Copy link
Member

Thank you @brettburley , published as testem@3.13.0

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.

None yet

2 participants