Skip to content

Commit

Permalink
Merge pull request #179 from ahmed-deriv/ahmed/DAPI-821/fix--sync-end…
Browse files Browse the repository at this point in the history
…point-configV3

Ahmed/dapi 821/fix  sync endpoint config v3
  • Loading branch information
sandeep-deriv authored Dec 20, 2024
2 parents 0f07d77 + 391af35 commit 9aa52f4
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 1,425 deletions.
257 changes: 0 additions & 257 deletions _data/v3.yml

This file was deleted.

34 changes: 34 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,37 @@ console.warn = (...args) => {
originalConsoleWarn(...args);
}
};

const mockYamlContent = `
groups:
- label: All Calls
methods:
- name: account_list
title: Account List
- name: active_symbols
title: Active Symbols
- name: app_get
title: Application: Get Details
`;

jest.mock('yaml', () => ({
parse: jest.fn(() => ({
groups: [
{
label: 'All Calls',
methods: [
{ name: 'account_list', title: 'Account List' },
{ name: 'active_symbols', title: 'Active Symbols' },
{ name: 'app_get', title: 'Application: Get Details' },
],
},
],
})),
}));

global.fetch = jest.fn(() =>
Promise.resolve({
text: () => Promise.resolve(mockYamlContent),
}),
) as jest.Mock;

32 changes: 28 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc"
},
"dependencies": {
"@deriv-com/quill-ui": "^1.16.21",
"@deriv-com/analytics": "^1.22.1",
"@deriv-com/auth-client": "^1.3.1",
"@deriv-com/quill-ui": "^1.16.21",
"@deriv/deriv-api": "^1.0.11",
"@radix-ui/react-tooltip": "^1.0.7",
"@react-spring/web": "^9.7.3",
"@deriv/ui": "^0.8.0",
"@docusaurus/core": "^3.3.2",
"@docusaurus/plugin-client-redirects": "^3.3.2",
Expand All @@ -43,6 +41,8 @@
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.0.2",
"@radix-ui/react-tabs": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"@react-spring/web": "^9.7.3",
"@textea/json-viewer": "^3.4.1",
"@use-gesture/react": "^10.3.0",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
Expand All @@ -63,6 +63,7 @@
"ts-jest": "^29.0.3",
"typescript": "^5.4.5",
"usehooks-ts": "^2.9.1",
"yaml": "^2.6.1",
"yup": "^0.32.11"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 9aa52f4

Please sign in to comment.