Skip to content

Commit 7ccc975

Browse files
committed
chore: test
1 parent c152792 commit 7ccc975

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
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",

src/service-endpoints.test.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getServiceClientEndpoint } from './service-endpoints';
22
import { GeneratedServiceClientCtor } from './types';
33
import 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
76
type 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

0 commit comments

Comments
 (0)