File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,23 @@ describe('execute', () => {
271271 expect ( ( ) => buildRequest ( { spec, operationId : 'getMe' } ) ) . toThrow ( 'Required parameter petId is not provided' )
272272 } )
273273
274+ it ( 'should throw error if operation was not found' , function ( ) {
275+ // Given
276+ const spec = {
277+ host : 'swagger.io' ,
278+ basePath : '/v1' ,
279+ paths : {
280+ '/one' : {
281+ get : {
282+ operationId : 'getMe'
283+ }
284+ }
285+ }
286+ }
287+
288+ expect ( ( ) => buildRequest ( { spec, operationId : 'nonExistingOperationId' } ) ) . toThrow ( 'Operation nonExistingOperationId not found' )
289+ } )
290+
274291 describe ( 'formData' , function ( ) {
275292 it ( 'should add an empty query param if the value is empty and allowEmptyValue: true' , function ( ) {
276293 // Given
You can’t perform that action at this time.
0 commit comments