File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed
Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 1616 window . userAgent = {
1717 isNode : false ,
1818 isBrowser : true ,
19+ isOldIE : navigator . userAgent . indexOf ( 'MSIE' ) >= 0 ,
1920 isKarma : ! ! window . __karma__
2021 } ;
2122 }
Original file line number Diff line number Diff line change @@ -35,23 +35,26 @@ describe('HTTP options', function() {
3535 . catch ( done ) ;
3636 } ) ;
3737
38- it ( 'should set custom HTTP headers' , function ( done ) {
39- testDone = done ;
40- var parser = new $RefParser ( ) ;
38+ // Old versions of IE don't allow setting custom headers
39+ if ( ! userAgent . isOldIE ) {
40+ it ( 'should set custom HTTP headers' , function ( done ) {
41+ testDone = done ;
42+ var parser = new $RefParser ( ) ;
4143
42- parser . parse ( 'http://httpbin.org/headers' , {
43- http : {
44- headers : {
45- 'my-custom-header' : 'hello, world'
44+ parser . parse ( 'http://httpbin.org/headers' , {
45+ http : {
46+ headers : {
47+ 'my-custom-header' : 'hello, world'
48+ }
4649 }
47- }
48- } )
49- . then ( function ( schema ) {
50- expect ( schema . headers ) . to . have . property ( 'My-Custom-Header' , 'hello, world' ) ;
51- done ( ) ;
52- } )
53- . catch ( done ) ;
54- } ) ;
50+ } )
51+ . then ( function ( schema ) {
52+ expect ( schema . headers ) . to . have . property ( 'My-Custom-Header' , 'hello, world' ) ;
53+ done ( ) ;
54+ } )
55+ . catch ( done ) ;
56+ } ) ;
57+ }
5558 } ) ;
5659
5760 describe ( 'options.http.redirect' , function ( ) {
You can’t perform that action at this time.
0 commit comments