@@ -23,7 +23,6 @@ describe('convert function', function () {
2323 it ( 'should convert a simple get request with timeout' , function ( done ) {
2424 const collection = new sdk . Collection ( JSON . parse (
2525 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
26- // collection.items.members.forEach((item) => {
2726 convert ( collection . items . members [ 1 ] . request , { requestTimeout : 3 } , function ( err , snippet ) {
2827 if ( err ) {
2928 console . error ( err ) ;
@@ -32,112 +31,97 @@ describe('convert function', function () {
3231 expect ( snippet . includes ( 'timeout(3)' ) ) . to . be . true ;
3332 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
3433 } ) ;
35- // });
3634 done ( ) ;
3735 } ) ;
3836
3937 it ( 'should convert a post request with formdata' , function ( done ) {
4038 const collection = new sdk . Collection ( JSON . parse (
4139 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
42- // collection.items.members.forEach((item) => {
4340 convert ( collection . items . members [ 4 ] . request , { } , function ( err , snippet ) {
4441 if ( err ) {
4542 console . error ( err ) ;
4643 }
4744 expect ( snippet ) . to . not . be . empty ;
4845 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
4946 } ) ;
50- // });
5147 done ( ) ;
5248 } ) ;
5349
5450 it ( 'should convert a post request with raw data' , function ( done ) {
5551 const collection = new sdk . Collection ( JSON . parse (
5652 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
57- // collection.items.members.forEach((item) => {
5853 convert ( collection . items . members [ 6 ] . request , { } , function ( err , snippet ) {
5954 if ( err ) {
6055 console . error ( err ) ;
6156 }
6257 expect ( snippet ) . to . not . be . empty ;
6358 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
6459 } ) ;
65- // });
6660 done ( ) ;
6761 } ) ;
6862
6963 it ( 'should convert a post request with urlencoded' , function ( done ) {
7064 const collection = new sdk . Collection ( JSON . parse (
7165 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
72- // collection.items.members.forEach((item) => {
7366 convert ( collection . items . members [ 7 ] . request , { } , function ( err , snippet ) {
7467 if ( err ) {
7568 console . error ( err ) ;
7669 }
7770 expect ( snippet ) . to . not . be . empty ;
7871 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
7972 } ) ;
80- // });
8173 done ( ) ;
8274 } ) ;
8375
8476 it ( 'should convert a post request with json with raw' , function ( done ) {
8577 const collection = new sdk . Collection ( JSON . parse (
8678 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
87- // collection.items.members.forEach((item) => {
8879 convert ( collection . items . members [ 8 ] . request , { } , function ( err , snippet ) {
8980 if ( err ) {
9081 console . error ( err ) ;
9182 }
9283 expect ( snippet ) . to . not . be . empty ;
9384 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
9485 } ) ;
95- // });
9686 done ( ) ;
9787 } ) ;
9888
9989 it ( 'should convert a post request with javascript with raw' , function ( done ) {
10090 const collection = new sdk . Collection ( JSON . parse (
10191 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
102- // collection.items.members.forEach((item) => {
10392 convert ( collection . items . members [ 9 ] . request , { } , function ( err , snippet ) {
10493 if ( err ) {
10594 console . error ( err ) ;
10695 }
10796 expect ( snippet ) . to . not . be . empty ;
10897 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
10998 } ) ;
110- // });
11199 done ( ) ;
112100 } ) ;
113101
114102 it ( 'should convert a post request with xml with raw' , function ( done ) {
115103 const collection = new sdk . Collection ( JSON . parse (
116104 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
117- // collection.items.members.forEach((item) => {
118105 convert ( collection . items . members [ 10 ] . request , { } , function ( err , snippet ) {
119106 if ( err ) {
120107 console . error ( err ) ;
121108 }
122109 expect ( snippet ) . to . not . be . empty ;
123110 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
124111 } ) ;
125- // });
126112 done ( ) ;
127113 } ) ;
128114
129115 it ( 'should convert a post request with binary file' , function ( done ) {
130116 const collection = new sdk . Collection ( JSON . parse (
131117 fs . readFileSync ( path . resolve ( __dirname , './fixtures/sample_collection.json' ) . toString ( ) ) ) ) ;
132- // collection.items.members.forEach((item) => {
133118 convert ( collection . items . members [ 25 ] . request , { } , function ( err , snippet ) {
134119 if ( err ) {
135120 console . error ( err ) ;
136121 }
137122 expect ( snippet ) . to . not . be . empty ;
138123 fs . writeFileSync ( path . join ( __dirname , './fixtures/snippet.r' ) , snippet ) ;
139124 } ) ;
140- // });
141125 done ( ) ;
142126 } ) ;
143127
0 commit comments