Skip to content

Commit 9aa52f4

Browse files
Merge pull request #179 from ahmed-deriv/ahmed/DAPI-821/fix--sync-endpoint-configV3
Ahmed/dapi 821/fix sync endpoint config v3
2 parents 0f07d77 + 391af35 commit 9aa52f4

File tree

15 files changed

+214
-1425
lines changed

15 files changed

+214
-1425
lines changed

_data/v3.yml

Lines changed: 0 additions & 257 deletions
This file was deleted.

jest.setup.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,37 @@ console.warn = (...args) => {
4343
originalConsoleWarn(...args);
4444
}
4545
};
46+
47+
const mockYamlContent = `
48+
groups:
49+
- label: All Calls
50+
methods:
51+
- name: account_list
52+
title: Account List
53+
- name: active_symbols
54+
title: Active Symbols
55+
- name: app_get
56+
title: Application: Get Details
57+
`;
58+
59+
jest.mock('yaml', () => ({
60+
parse: jest.fn(() => ({
61+
groups: [
62+
{
63+
label: 'All Calls',
64+
methods: [
65+
{ name: 'account_list', title: 'Account List' },
66+
{ name: 'active_symbols', title: 'Active Symbols' },
67+
{ name: 'app_get', title: 'Application: Get Details' },
68+
],
69+
},
70+
],
71+
})),
72+
}));
73+
74+
global.fetch = jest.fn(() =>
75+
Promise.resolve({
76+
text: () => Promise.resolve(mockYamlContent),
77+
}),
78+
) as jest.Mock;
79+

package-lock.json

Lines changed: 28 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@
2626
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc"
2727
},
2828
"dependencies": {
29-
"@deriv-com/quill-ui": "^1.16.21",
3029
"@deriv-com/analytics": "^1.22.1",
3130
"@deriv-com/auth-client": "^1.3.1",
31+
"@deriv-com/quill-ui": "^1.16.21",
3232
"@deriv/deriv-api": "^1.0.11",
33-
"@radix-ui/react-tooltip": "^1.0.7",
34-
"@react-spring/web": "^9.7.3",
3533
"@deriv/ui": "^0.8.0",
3634
"@docusaurus/core": "^3.3.2",
3735
"@docusaurus/plugin-client-redirects": "^3.3.2",
@@ -43,6 +41,8 @@
4341
"@radix-ui/react-accordion": "^1.1.2",
4442
"@radix-ui/react-dropdown-menu": "^2.0.2",
4543
"@radix-ui/react-tabs": "^1.0.2",
44+
"@radix-ui/react-tooltip": "^1.0.7",
45+
"@react-spring/web": "^9.7.3",
4646
"@textea/json-viewer": "^3.4.1",
4747
"@use-gesture/react": "^10.3.0",
4848
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
@@ -63,6 +63,7 @@
6363
"ts-jest": "^29.0.3",
6464
"typescript": "^5.4.5",
6565
"usehooks-ts": "^2.9.1",
66+
"yaml": "^2.6.1",
6667
"yup": "^0.32.11"
6768
},
6869
"devDependencies": {

0 commit comments

Comments
 (0)