1 import {getTSUIElasticSearchQueryString} from 'app/networking/NetworkUtil';
3 describe("Network Utils", () => {
4 describe('#getTSUIElasticSearchQueryString', () => {
5 it('should return query body', () => {
7 const response = getTSUIElasticSearchQueryString(query);
8 expect(response).toEqual({"maxResults": "10", "queryStr": "query"});
11 it('should return partial request query', () => {
13 const response = getTSUIElasticSearchQueryString(query);
14 expect(response).toEqual({"maxResults": "10", "queryStr": ""});
17 it('should be truthy', () => {
19 expect(getTSUIElasticSearchQueryString(query)).toBeTruthy();