@@ -30,12 +30,10 @@ async function start() {
3030 console . log ( '\nTest Started' ) ;
3131
3232 // Ping
33-
3433 response = await client . ping ( ) ;
3534 console . log ( response . result ) ;
3635
3736 // Foo
38-
3937 response = await foo . get ( 'string' , 123 , [ 'string in array' ] ) ;
4038 console . log ( response . result ) ;
4139
@@ -51,8 +49,43 @@ async function start() {
5149 response = await foo . delete ( 'string' , 123 , [ 'string in array' ] ) ;
5250 console . log ( response . result ) ;
5351
54- // Bar
52+ // Foo (Object params)
53+ response = await foo . get ( {
54+ x : 'string' ,
55+ y : 123 ,
56+ z : [ 'string in array' ]
57+ } ) ;
58+ console . log ( response . result ) ;
59+
60+ response = await foo . post ( {
61+ x : 'string' ,
62+ y : 123 ,
63+ z : [ 'string in array' ]
64+ } ) ;
65+ console . log ( response . result ) ;
66+
67+ response = await foo . put ( {
68+ x : 'string' ,
69+ y : 123 ,
70+ z : [ 'string in array' ]
71+ } ) ;
72+ console . log ( response . result ) ;
5573
74+ response = await foo . patch ( {
75+ x : 'string' ,
76+ y : 123 ,
77+ z : [ 'string in array' ]
78+ } ) ;
79+ console . log ( response . result ) ;
80+
81+ response = await foo . delete ( {
82+ x : 'string' ,
83+ y : 123 ,
84+ z : [ 'string in array' ]
85+ } ) ;
86+ console . log ( response . result ) ;
87+
88+ // Bar
5689 response = await bar . get ( 'string' , 123 , [ 'string in array' ] ) ;
5790 console . log ( response . result ) ;
5891
@@ -68,9 +101,47 @@ async function start() {
68101 response = await bar . delete ( 'string' , 123 , [ 'string in array' ] ) ;
69102 console . log ( response . result ) ;
70103
104+ // Bar (Object params)
105+ response = await bar . get ( {
106+ required : 'string' ,
107+ xdefault : 123 ,
108+ z : [ 'string in array' ]
109+ } ) ;
110+ console . log ( response . result ) ;
111+
112+ response = await bar . post ( {
113+ required : 'string' ,
114+ xdefault : 123 ,
115+ z : [ 'string in array' ]
116+ } ) ;
117+ console . log ( response . result ) ;
118+
119+ response = await bar . put ( {
120+ required : 'string' ,
121+ xdefault : 123 ,
122+ z : [ 'string in array' ]
123+ } ) ;
124+ console . log ( response . result ) ;
125+
126+ response = await bar . patch ( {
127+ required : 'string' ,
128+ xdefault : 123 ,
129+ z : [ 'string in array' ]
130+ } ) ;
131+ console . log ( response . result ) ;
132+
133+ response = await bar . delete ( {
134+ required : 'string' ,
135+ xdefault : 123 ,
136+ z : [ 'string in array' ]
137+ } ) ;
138+ console . log ( response . result ) ;
139+
140+ // General
71141 response = await general . redirect ( ) ;
72142 console . log ( response . result ) ;
73143
144+ // Upload
74145 response = await general . upload ( 'string' , 123 , [ 'string in array' ] , InputFile . fromPath ( __dirname + '/../../resources/file.png' , 'file.png' ) ) ;
75146 console . log ( response . result ) ;
76147
@@ -85,6 +156,46 @@ async function start() {
85156 response = await general . upload ( 'string' , 123 , [ 'string in array' ] , InputFile . fromBuffer ( largeBuffer , 'large_file.mp4' ) )
86157 console . log ( response . result ) ;
87158
159+ // Upload (Object params)
160+ response = await general . upload ( {
161+ x : 'string' ,
162+ y : 123 ,
163+ z : [ 'string in array' ] ,
164+ file : InputFile . fromPath ( __dirname + '/../../resources/file.png' , 'file.png' )
165+ } ) ;
166+ console . log ( response . result ) ;
167+
168+ response = await general . upload ( {
169+ x : 'string' ,
170+ y : 123 ,
171+ z : [ 'string in array' ] ,
172+ file : InputFile . fromPath ( __dirname + '/../../resources/large_file.mp4' , 'large_file.mp4' )
173+ } ) ;
174+ console . log ( response . result ) ;
175+
176+ response = await general . upload ( {
177+ x : 'string' ,
178+ y : 123 ,
179+ z : [ 'string in array' ] ,
180+ file : InputFile . fromBuffer ( smallBuffer , 'file.png' ) ,
181+ onProgress : ( progress ) => {
182+ // nothing
183+ }
184+ } ) ;
185+ console . log ( response . result ) ;
186+
187+ response = await general . upload ( {
188+ x : 'string' ,
189+ y : 123 ,
190+ z : [ 'string in array' ] ,
191+ file : InputFile . fromBuffer ( largeBuffer , 'large_file.mp4' ) ,
192+ onProgress : ( progress ) => {
193+ // nothing
194+ }
195+ } ) ;
196+ console . log ( response . result ) ;
197+
198+ // Enum
88199 response = await general . enum ( MockType . First ) ;
89200 console . log ( response . result ) ;
90201
0 commit comments