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 16
16
window . userAgent = {
17
17
isNode : false ,
18
18
isBrowser : true ,
19
+ isOldIE : navigator . userAgent . indexOf ( 'MSIE' ) >= 0 ,
19
20
isKarma : ! ! window . __karma__
20
21
} ;
21
22
}
Original file line number Diff line number Diff line change @@ -35,23 +35,26 @@ describe('HTTP options', function() {
35
35
. catch ( done ) ;
36
36
} ) ;
37
37
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 ( ) ;
41
43
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
+ }
46
49
}
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
+ }
55
58
} ) ;
56
59
57
60
describe ( 'options.http.redirect' , function ( ) {
You can’t perform that action at this time.
0 commit comments