Skip to content

Commit

Permalink
tslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Mar 5, 2020
1 parent c27e33a commit d34cb7c
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,20 @@ describe('supportsFieldMeta', () => {

describe('esAggFieldsFactory', () => {
test('Should only create top terms field when term field is not provided', () => {
const fields = esAggFieldsFactory({ type: AGG_TYPE.TERMS });
const fields = esAggFieldsFactory(
{ type: AGG_TYPE.TERMS },
mockEsAggSource,
FIELD_ORIGIN.SOURCE
);
expect(fields.length).toBe(1);
});

test('Should create top terms and top terms percentage fields', () => {
const fields = esAggFieldsFactory({ type: AGG_TYPE.TERMS, field: 'myField' });
const fields = esAggFieldsFactory(
{ type: AGG_TYPE.TERMS, field: 'myField' },
mockEsAggSource,
FIELD_ORIGIN.SOURCE
);
expect(fields.length).toBe(2);
});
});

0 comments on commit d34cb7c

Please sign in to comment.