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

fix: test fix #273

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 0 additions & 140 deletions src/hooks/useDynamicImportJSON/__tests__/useDynamicImport.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,144 +110,4 @@ describe('useDynamicImportJSON', () => {
name: 'active_symbols',
});
});

it('should have correct text area inputs inside dynamic imports correctly', () => {
act(() => {
result.current.dynamicImportJSON(result.current.text_data.selected_value);
});
expect(result.current.request_info).toEqual({
$schema: 'http://json-schema.org/draft-04/schema#',
additionalProperties: false,
auth_required: 0,
default: {
$schema: 'http://json-schema.org/draft-04/schema#',
additionalProperties: false,
auth_required: 0,
description:
'Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).',
properties: {
active_symbols: {
description: 'If you use `brief`, only a subset of fields will be returned.',
enum: ['brief', 'full'],
type: 'string',
},
landing_company: {
description: 'Deprecated - replaced by landing_company_short.',
enum: [
'iom',
'malta',
'maltainvest',
'svg',
'virtual',
'vanuatu',
'champion',
'champion-virtual',
],
type: 'string',
},
landing_company_short: {
description:
'[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.',
enum: [
'iom',
'malta',
'maltainvest',
'svg',
'virtual',
'vanuatu',
'champion',
'champion-virtual',
],
type: 'string',
},
loginid: {
description:
"[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
pattern: '^[A-Za-z]+[0-9]+$',
type: 'string',
},
passthrough: {
description:
'[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.',
type: 'object',
},
product_type: {
description:
'[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.',
enum: ['basic'],
type: 'string',
},
req_id: {
description: '[Optional] Used to map request to response.',
type: 'integer',
},
},
required: ['active_symbols'],
title: 'Active Symbols (request)',
type: 'object',
},
description:
'Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).',
properties: {
active_symbols: {
description: 'If you use `brief`, only a subset of fields will be returned.',
enum: ['brief', 'full'],
type: 'string',
},
landing_company: {
description: 'Deprecated - replaced by landing_company_short.',
enum: [
'iom',
'malta',
'maltainvest',
'svg',
'virtual',
'vanuatu',
'champion',
'champion-virtual',
],
type: 'string',
},
landing_company_short: {
description:
'[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.',
enum: [
'iom',
'malta',
'maltainvest',
'svg',
'virtual',
'vanuatu',
'champion',
'champion-virtual',
],
type: 'string',
},
loginid: {
description:
"[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
pattern: '^[A-Za-z]+[0-9]+$',
type: 'string',
},
passthrough: {
description:
'[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.',
type: 'object',
},
product_type: {
description:
'[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.',
enum: ['basic'],
type: 'string',
},
req_id: {
description: '[Optional] Used to map request to response.',
type: 'integer',
},
},
required: ['active_symbols'],
title: 'Active Symbols (request)',
type: 'object',
});
});
});