-
Notifications
You must be signed in to change notification settings - Fork 88
fix: added support for "missing" matcher #1905
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
Conversation
❌ Deploy Preview for graceful-sfogliatella-8d42f0 failed.
|
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for nextjs-plugin-custom-routes-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Nice! Can you re-enable these tests to confirm that they now pass: https://github.com/netlify/next-runtime/blob/main/test/e2e/modified-tests/middleware-custom-matchers/test/index.test.ts#L24-L44 |
The tests are failing because you need to run prettier: https://github.com/netlify/next-runtime/actions/runs/4001502021/jobs/6867794232 |
Looks good! Is it possible to add an example of this new matcher working in one of our demos? |
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.
Yay! Thank you!
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.
Nice work!
Summary
This update allows us to support the "missing" matcher key. The 'missing' matcher is the opposite of 'has' and checks if the type, key and/or value doesn't match.
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
fixes #1796
Standard checks:
x-cookie-missing: true
in the response headersx-cookie-missing: true
should now be gone since the cookie has been applied.🧪 Once merged, make sure to update the version if needed and that it was published correctly.