Add tests to Inventory module
[aai/sparky-fe.git] / test / networking / NetworkUtil.test.js
1 import {getTSUIElasticSearchQueryString} from 'app/networking/NetworkUtil';
2
3 describe("Network Utils", () => {
4   describe('#getTSUIElasticSearchQueryString', () => {
5     it('should return query body', () => {
6       const query = "query";
7       const response = getTSUIElasticSearchQueryString(query);
8       expect(response).toEqual({"maxResults": "10", "queryStr": "query"});
9     });
10
11     it('should return partial request query', () => {
12       const query = "";
13       const response = getTSUIElasticSearchQueryString(query);
14       expect(response).toEqual({"maxResults": "10", "queryStr": ""});
15     });
16
17     it('should be truthy', () => {
18       const query = "";
19       expect(getTSUIElasticSearchQueryString(query)).toBeTruthy();
20     })
21   });
22 });