Skip to content

Commit 0ab27ed

Browse files
committed
Merge branch 'main' into mk/matcher-magic
2 parents f6f12ab + 6789f37 commit 0ab27ed

File tree

6 files changed

+133
-138
lines changed

6 files changed

+133
-138
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!--Please tag yourself as the Assignee and netlify/frameworks as the Reviewer -->
2-
31
### Summary
42

53
<!-- Provide a brief summary of the change. -->

cypress/integration/middleware/enhanced.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('Enhanced middleware', () => {
1818
})
1919

2020
it('modifies the page props', () => {
21-
cy.request('/_next/data/build-id/static.json').then((response) => {
21+
cy.request('/_next/data/build-id/en/static.json').then((response) => {
2222
expect(response.body).to.have.nested.property('pageProps.showAd', true)
2323
expect(response.body)
2424
.to.have.nested.property('pageProps.message')

cypress/integration/middleware/standard.spec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,22 @@ describe('Middleware matchers', () => {
3737
})
3838

3939
it('matches when headers are sent', () => {
40-
cy.request('/_next/data/build-id/static.json').then((response) => {
40+
cy.request('/_next/data/build-id/en/static.json').then((response) => {
4141
expect(response.headers).to.have.property('x-is-deno', 'true')
4242
expect(response.headers).to.have.property('x-modified-edge', 'true')
4343
})
4444
})
45+
46+
it('correctly handles negative lookaheads', () => {
47+
cy.request('/shows/11').then((response) => {
48+
expect(response.headers).to.have.property('x-is-deno', 'true')
49+
expect(response.headers).to.have.property('x-modified-edge', 'true')
50+
})
51+
cy.request('/shows/99').then((response) => {
52+
expect(response.headers).not.to.have.property('x-is-deno', 'true')
53+
expect(response.headers).not.to.have.property('x-modified-edge', 'true')
54+
})
55+
})
4556
})
4657

4758
describe('Middleware with edge API', () => {

0 commit comments

Comments
 (0)