Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Dec 9, 2019
1 parent 7eee0e4 commit 54d785f
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,15 @@
* under the License.
*/

import moment from 'moment';
import { of } from 'rxjs';
import { expect } from 'chai';
import { getEsShardTimeout } from '../../helpers/get_es_shard_timeout';

describe('getEsShardTimeout', () => {
it('should return the elasticsearch.shardTimeout', async () => {
const req = {
server: {
newPlatform: {
__internals: {
elasticsearch: { legacy: { config$: of({ shardTimeout: moment.duration(12345) }) } },
},
},
},
getEsShardTimeout: async () => {
return 12345;
}
};

const timeout = await getEsShardTimeout(req);
Expand Down

0 comments on commit 54d785f

Please sign in to comment.