1515 */
1616
1717import { findSharedPath , removeObjectDuplicates , removeSecurityDuplicates , slugify } from '../src/utils'
18- import { extractOperationBasePath } from '../src/apitypes/rest/rest.utils'
18+ import { getOperationBasePath } from '../src/apitypes/rest/rest.utils'
1919
2020describe ( 'Utils' , ( ) => {
2121 describe ( 'Unit tests for \'slugify\' function' , ( ) => {
@@ -42,20 +42,20 @@ describe('Utils', () => {
4242 } ,
4343 } ]
4444
45- expect ( extractOperationBasePath ( servers ) ) . toEqual ( '/api' )
45+ expect ( getOperationBasePath ( servers ) ) . toEqual ( '/api' )
4646 } )
4747
4848 test ( 'Should handle Servers with absolute url correctly' , ( ) => {
49- expect ( extractOperationBasePath ( [ { url : 'https://example.com/v1' } ] ) ) . toEqual ( '/v1' )
50- expect ( extractOperationBasePath ( [ { url : 'https://example.com/v1/' } ] ) ) . toEqual ( '/v1' )
49+ expect ( getOperationBasePath ( [ { url : 'https://example.com/v1' } ] ) ) . toEqual ( '/v1' )
50+ expect ( getOperationBasePath ( [ { url : 'https://example.com/v1/' } ] ) ) . toEqual ( '/v1' )
5151 } )
5252
5353 test ( 'Should handle Servers with relative url correctly' , ( ) => {
54- expect ( extractOperationBasePath ( [ { url : '/v1' } ] ) ) . toEqual ( '/v1' )
55- expect ( extractOperationBasePath ( [ { url : 'v1' } ] ) ) . toEqual ( '/v1' )
56- expect ( extractOperationBasePath ( [ { url : 'v1/' } ] ) ) . toEqual ( '/v1' )
57- expect ( extractOperationBasePath ( [ { url : '/v1/' } ] ) ) . toEqual ( '/v1' )
58- expect ( extractOperationBasePath ( [ { url : '/' } ] ) ) . toEqual ( '' )
54+ expect ( getOperationBasePath ( [ { url : '/v1' } ] ) ) . toEqual ( '/v1' )
55+ expect ( getOperationBasePath ( [ { url : 'v1' } ] ) ) . toEqual ( '/v1' )
56+ expect ( getOperationBasePath ( [ { url : 'v1/' } ] ) ) . toEqual ( '/v1' )
57+ expect ( getOperationBasePath ( [ { url : '/v1/' } ] ) ) . toEqual ( '/v1' )
58+ expect ( getOperationBasePath ( [ { url : '/' } ] ) ) . toEqual ( '' )
5959 } )
6060 } )
6161
0 commit comments