@@ -519,7 +519,7 @@ describe('execute', () => {
519519 '/one' : {
520520 post : {
521521 operationId : 'postMe' ,
522- parameters : [ { name : 'foo' , type : 'file' , 'in' : " formData" } ]
522+ parameters : [ { name : 'foo' , type : 'file' , in : ' formData' } ]
523523 }
524524 }
525525 }
@@ -529,16 +529,15 @@ describe('execute', () => {
529529 const req = buildRequest ( {
530530 spec,
531531 operationId : 'postMe' ,
532- parameters : { file : 'test' } } )
532+ parameters : { file : 'test' } } )
533533
534534 // Then
535535 expect ( req . headers ) . toEqual ( {
536- " content-type" : " multipart/form-data"
536+ ' content-type' : ' multipart/form-data'
537537 } )
538538
539539 expect ( req . url ) . toEqual ( 'http://swagger.io/one' )
540540 expect ( req . body ) . toBeA ( FormData ) // Would like to do a more thourough test ( ie: ensure the value `foo` exists.. but I don't feel like attacking the interals of the node pollyfill for FormData, as it seems to be missing `.get()`)
541-
542541 } )
543542
544543 it ( 'should add content-type application/x-www-form-urlencoded when in: formData ' , function ( ) {
@@ -559,15 +558,15 @@ describe('execute', () => {
559558 const req = buildRequest ( {
560559 spec,
561560 operationId : 'postMe' ,
562- parameters : { file : 'test' } } )
561+ parameters : { file : 'test' } } )
563562
564563 // Then
565564 expect ( req ) . toEqual ( {
566- body : " file=test" ,
567- method : " POST" ,
565+ body : ' file=test' ,
566+ method : ' POST' ,
568567 url : 'http://swagger.io/one' ,
569568 headers : {
570- " content-type" : " application/x-www-form-urlencoded"
569+ ' content-type' : ' application/x-www-form-urlencoded'
571570 } ,
572571 credentials : 'same-origin'
573572 } )
@@ -577,7 +576,7 @@ describe('execute', () => {
577576 // Given
578577 const spec = {
579578 host : 'swagger.io' ,
580- consumes : [ " test" ] ,
579+ consumes : [ ' test' ] ,
581580 paths : {
582581 '/one' : {
583582 post : {
@@ -592,15 +591,15 @@ describe('execute', () => {
592591 const req = buildRequest ( {
593592 spec,
594593 operationId : 'postMe' ,
595- parameters : { file : 'test' } } )
594+ parameters : { file : 'test' } } )
596595
597596 // Then
598597 expect ( req ) . toEqual ( {
599- body : " file=test" ,
600- method : " POST" ,
598+ body : ' file=test' ,
599+ method : ' POST' ,
601600 url : 'http://swagger.io/one' ,
602601 headers : {
603- " content-type" : " test"
602+ ' content-type' : ' test'
604603 } ,
605604 credentials : 'same-origin'
606605 } )
@@ -610,12 +609,12 @@ describe('execute', () => {
610609 // Given
611610 const spec = {
612611 host : 'swagger.io' ,
613- consumes : [ "no" ] ,
612+ consumes : [ 'no' ] ,
614613 paths : {
615614 '/one' : {
616615 post : {
617616 operationId : 'postMe' ,
618- consumes : [ " test" ] ,
617+ consumes : [ ' test' ] ,
619618 parameters : [ { name : 'file' , in : 'formData' } ]
620619 }
621620 }
@@ -626,15 +625,15 @@ describe('execute', () => {
626625 const req = buildRequest ( {
627626 spec,
628627 operationId : 'postMe' ,
629- parameters : { file : 'test' } } )
628+ parameters : { file : 'test' } } )
630629
631630 // Then
632631 expect ( req ) . toEqual ( {
633- body : " file=test" ,
634- method : " POST" ,
632+ body : ' file=test' ,
633+ method : ' POST' ,
635634 url : 'http://swagger.io/one' ,
636635 headers : {
637- " content-type" : " test"
636+ ' content-type' : ' test'
638637 } ,
639638 credentials : 'same-origin'
640639 } )
@@ -1585,10 +1584,10 @@ describe('execute', () => {
15851584 const req = buildRequest ( { spec, operationId : 'getPetsById' , parameters : { id : 123 , test : 567 } } )
15861585
15871586 expect ( req ) . toEqual ( {
1588- url : " http://swagger.io/v1/pet/123?test=567" ,
1587+ url : ' http://swagger.io/v1/pet/123?test=567' ,
15891588 headers : { } ,
15901589 credentials : 'same-origin' ,
1591- method : " GET"
1590+ method : ' GET'
15921591 } )
15931592 } )
15941593
@@ -1620,13 +1619,13 @@ describe('execute', () => {
16201619 }
16211620 }
16221621
1623- const req = buildRequest ( { spec, operationId : 'getPetsById' , parameters : { id : 123 , test : 567 } } )
1622+ const req = buildRequest ( { spec, operationId : 'getPetsById' , parameters : { id : 123 , test : 567 } } )
16241623
16251624 expect ( req ) . toEqual ( {
1626- url : " http://swagger.io/v1/pet/123?test=567" ,
1625+ url : ' http://swagger.io/v1/pet/123?test=567' ,
16271626 headers : { } ,
16281627 credentials : 'same-origin' ,
1629- method : " GET"
1628+ method : ' GET'
16301629 } )
16311630 } )
16321631
0 commit comments