@@ -15,7 +15,7 @@ run(() => {
1515 comment ( 'get index' )
1616 return test ( '/' , null , response => {
1717 equal ( response . status , 200 , 'status is correct' )
18- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
18+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
1919 'content type is correct' )
2020 deepEqual ( response . body , [ 'user' , 'animal' , '☯' ] ,
2121 'response body is correct' )
@@ -27,7 +27,7 @@ run(() => {
2727 comment ( 'get empty collection' )
2828 return test ( encodeURI ( '/☯' ) , null , response => {
2929 equal ( response . status , 200 , 'status is correct' )
30- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
30+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
3131 'content type is correct' )
3232 deepEqual ( response . body , [ ] , 'response body is correct' )
3333 } )
@@ -38,7 +38,7 @@ run(() => {
3838 comment ( 'get records' )
3939 return test ( '/user' , null , response => {
4040 equal ( response . status , 200 , 'status is correct' )
41- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
41+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
4242 'content type is correct' )
4343 equal ( response . body . length , 3 , 'response body is correct' )
4444 } )
@@ -49,7 +49,7 @@ run(() => {
4949 comment ( 'get records by ID' )
5050 return test ( '/animal/1,%2Fwtf' , null , response => {
5151 equal ( response . status , 200 , 'status is correct' )
52- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
52+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
5353 'content type is correct' )
5454 deepEqual ( response . body . map ( record => record . id ) ,
5555 [ 1 , '/wtf' ] , 'response body is correct' )
@@ -63,7 +63,7 @@ run(() => {
6363 fields : 'name,owner'
6464 } ) } `, null , response => {
6565 equal ( response . status , 200 , 'status is correct' )
66- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
66+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
6767 'content type is correct' )
6868 deepEqual ( response . body . map ( record => Object . keys ( record ) . length ) ,
6969 [ 4 , 4 , 4 , 4 ] , 'response body fields are correct' )
@@ -77,7 +77,7 @@ run(() => {
7777 'match[name]' : 'Fido'
7878 } ) } `, null , response => {
7979 equal ( response . status , 200 , 'status is correct' )
80- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
80+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
8181 'content type is correct' )
8282 equal ( response . body [ 0 ] . name , 'Fido' , 'match is correct' )
8383 } )
@@ -92,7 +92,7 @@ run(() => {
9292 offset : 1
9393 } ) } `, null , response => {
9494 equal ( response . status , 200 , 'status is correct' )
95- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
95+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
9696 'content type is correct' )
9797 deepEqual ( response . body . map ( record => record . name ) ,
9898 [ 'Fido' , 'Sniffles' ] , 'response body is correct' )
@@ -112,7 +112,7 @@ run(() => {
112112 } ]
113113 } , response => {
114114 equal ( response . status , 201 , 'status is correct' )
115- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
115+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
116116 'content type is correct' )
117117 deepEqual ( response . body . map ( record => record . name ) ,
118118 [ 'Ayy lmao' ] , 'response body is correct' )
@@ -131,7 +131,7 @@ run(() => {
131131 } ]
132132 } , response => {
133133 equal ( response . status , 200 , 'status is correct' )
134- ok ( ~ response . headers . get ( 'content-type' ) . indexOf ( mediaType ) ,
134+ ok ( ~ response . headers [ 'content-type' ] . indexOf ( mediaType ) ,
135135 'content type is correct' )
136136 deepEqual ( response . body . map ( record => record . name ) ,
137137 [ 'Ayy lmao' ] , 'response body is correct' )
0 commit comments