File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 "webpack-cli" : " ^5.1.4"
7878 },
7979 "scripts" : {
80- "test" : " cross-env NODE_OPTIONS=\" --max-old-space-size=8192\" node --experimental-vm-modules node_modules/jest/bin/jest.js -c config/jest.ts --passWithNoTests '.*\\ .test\\ .ts$'" ,
80+ "test" : " npm run cloudapi:generate-services && cross-env NODE_OPTIONS=\" --max-old-space-size=8192\" node --experimental-vm-modules node_modules/jest/bin/jest.js -c config/jest.ts --passWithNoTests '.*\\ .test\\ .ts$'" ,
8181 "lint" : " eslint src config" ,
8282 "check-endpoints" : " ts-node scripts/check-endpoints.ts" ,
8383 "prettier:fix:clients" : " prettier src/clients/ --write" ,
Original file line number Diff line number Diff line change 11import { getServiceClientEndpoint } from './service-endpoints' ;
22import { GeneratedServiceClientCtor } from './types' ;
33import SERVICE_ENDPOINTS_MAP from './service-endpoints-map.json' ;
4- import { getServiceList } from '../scripts/check-endpoints' ;
54
65// eslint-disable-next-line @typescript-eslint/no-explicit-any
76type MockServiceClientCtor = GeneratedServiceClientCtor < any > ;
@@ -22,30 +21,6 @@ describe('service endpoints', () => {
2221 }
2322 } ) ;
2423
25- it ( 'each service should have endpoint' , async ( ) => {
26- const serviceList = await getServiceList ( ) ;
27- const missedEndpointsList : string [ ] = [ ] ;
28-
29- serviceList . forEach ( ( s ) => {
30- // full name without leading dot
31- const serviceName = s . fullName . slice ( 1 ) ;
32- let endpoint = '' ;
33-
34- try {
35- endpoint = getServiceClientEndpoint ( {
36- serviceName,
37- } as unknown as MockServiceClientCtor ) ;
38- // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-empty
39- } catch ( _err ) { }
40-
41- if ( ! endpoint ) missedEndpointsList . push ( serviceName ) ;
42- } ) ;
43-
44- if ( missedEndpointsList . length !== 0 ) {
45- throw `\nMissed endpoints:\n${ missedEndpointsList . join ( '\n' ) } \n` ;
46- }
47- } , 200_000 ) ;
48-
4924 it ( 'should throw exception if endpoint was not found' , ( ) => {
5025 const serviceName = 'myCustomService' ;
5126
You can’t perform that action at this time.
0 commit comments