File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
cypress/integration/middleware Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
describe ( 'Enhanced middleware' , ( ) => {
2
- it ( 'adds request headers' , ( ) => {
3
- cy . request ( '/api/hello' ) . then ( ( response ) => {
4
- expect ( response . body ) . to . have . nested . property ( 'headers.x-hello' , 'world' )
5
- } )
6
- } )
7
-
8
- it ( 'adds request headers to a rewrite' , ( ) => {
9
- cy . request ( '/headers' ) . then ( ( response ) => {
10
- expect ( response . body ) . to . have . nested . property ( 'headers.x-hello' , 'world' )
11
- } )
12
- } )
13
-
14
2
it ( 'rewrites the response body' , ( ) => {
15
3
cy . visit ( '/static' )
16
4
cy . get ( '#message' ) . contains ( 'This was static but has been transformed in' )
Original file line number Diff line number Diff line change 1
1
describe ( 'Standard middleware' , ( ) => {
2
+ it ( 'adds request headers' , ( ) => {
3
+ cy . request ( '/api/hello' ) . then ( ( response ) => {
4
+ expect ( response . body ) . to . have . nested . property ( 'headers.x-hello' , 'world' )
5
+ } )
6
+ } )
7
+
8
+ it ( 'adds request headers to a rewrite' , ( ) => {
9
+ cy . request ( '/headers' ) . then ( ( response ) => {
10
+ expect ( response . body ) . to . have . nested . property ( 'headers.x-hello' , 'world' )
11
+ } )
12
+ } )
13
+
2
14
it ( 'rewrites to internal page' , ( ) => {
3
15
// preview mode is off by default
4
16
cy . visit ( '/shows/rewriteme' )
You can’t perform that action at this time.
0 commit comments