Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 37995fe

Browse files
committed
chore: dynamocimporttests
1 parent 54b21de commit 37995fe

File tree

1 file changed

+88
-3
lines changed

1 file changed

+88
-3
lines changed

src/hooks/dynamicImport/__tests__/useDynamicImport.test.tsx

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,93 @@ describe('useDynamicImportJSON', () => {
3636
act(() => {
3737
result.current.dynamicImportJSON(result.current.text_data.selected_value);
3838
});
39-
expect(result.current.request_info).toEqual(
40-
'{\n "active_symbols": "brief",\n "product_type": "basic"\n}',
41-
);
39+
expect(result.current.request_info).toEqual({
40+
$schema: 'http://json-schema.org/draft-04/schema#',
41+
additionalProperties: false,
42+
auth_required: 0,
43+
default: {
44+
$schema: 'http://json-schema.org/draft-04/schema#',
45+
additionalProperties: false,
46+
auth_required: 0,
47+
description:
48+
'Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).',
49+
properties: {
50+
active_symbols: {
51+
description: 'If you use `brief`, only a subset of fields will be returned.',
52+
enum: ['brief', 'full'],
53+
type: 'string',
54+
},
55+
landing_company: {
56+
description:
57+
'[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.',
58+
enum: [
59+
'iom',
60+
'malta',
61+
'maltainvest',
62+
'svg',
63+
'virtual',
64+
'vanuatu',
65+
'champion',
66+
'champion-virtual',
67+
],
68+
type: 'string',
69+
},
70+
passthrough: {
71+
description:
72+
'[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.',
73+
type: 'object',
74+
},
75+
product_type: {
76+
description:
77+
'[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.',
78+
enum: ['basic'],
79+
type: 'string',
80+
},
81+
req_id: { description: '[Optional] Used to map request to response.', type: 'integer' },
82+
},
83+
required: ['active_symbols'],
84+
title: 'Active Symbols (request)',
85+
type: 'object',
86+
},
87+
description:
88+
'Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).',
89+
properties: {
90+
active_symbols: {
91+
description: 'If you use `brief`, only a subset of fields will be returned.',
92+
enum: ['brief', 'full'],
93+
type: 'string',
94+
},
95+
landing_company: {
96+
description:
97+
'[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.',
98+
enum: [
99+
'iom',
100+
'malta',
101+
'maltainvest',
102+
'svg',
103+
'virtual',
104+
'vanuatu',
105+
'champion',
106+
'champion-virtual',
107+
],
108+
type: 'string',
109+
},
110+
passthrough: {
111+
description:
112+
'[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.',
113+
type: 'object',
114+
},
115+
product_type: {
116+
description:
117+
'[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.',
118+
enum: ['basic'],
119+
type: 'string',
120+
},
121+
req_id: { description: '[Optional] Used to map request to response.', type: 'integer' },
122+
},
123+
required: ['active_symbols'],
124+
title: 'Active Symbols (request)',
125+
type: 'object',
126+
});
42127
});
43128
});

0 commit comments

Comments
 (0)