Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
solomontang committed Nov 19, 2021
1 parent b2caea5 commit ab306e5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/api/SearchApi.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import * as AxiosUtils from '../utils/axios';
import { SEARCH_API } from '../constants/ApiNames';
import {
ADVANCED_PATH,
COUNT_PATH,
DATA_SETS_PATH,
IDS_PATH,
NEIGHBORS_PATH,
SEARCH_ENTITY_TYPES_PATH,
} from '../constants/UrlConstants';
import { runTestSuite } from '../utils/testing/APITestSuite';
import { getMockAxiosInstance } from '../utils/testing/MockUtils';
Expand Down Expand Up @@ -36,6 +38,24 @@ describe(SEARCH_API, () => {
SearchApi,
SEARCH_API,
{
countEntitiesInSets: {
'': {
params: {
optional: [false, false],
valid: [MOCK_EKID_1, [MOCK_ESID_1, MOCK_ESID_2]],
},
},
'(entityTypeId, [entitySetIds])': {
method: 'post',
params: {
axios: [`/${SEARCH_ENTITY_TYPES_PATH}/${MOCK_EKID_1}/${COUNT_PATH}`, [
MOCK_ESID_1,
MOCK_ESID_2
]],
valid: [MOCK_EKID_1, [MOCK_ESID_1, MOCK_ESID_2]],
},
},
},
searchDataSetMetadata: {
'': {
params: {
Expand Down

0 comments on commit ab306e5

Please sign in to comment.