diff --git a/packages/provider-elasticsearch/src/example-types/filters/step.test.js b/packages/provider-elasticsearch/src/example-types/filters/step.test.js index 631f091bb..83855faf6 100644 --- a/packages/provider-elasticsearch/src/example-types/filters/step.test.js +++ b/packages/provider-elasticsearch/src/example-types/filters/step.test.js @@ -8,6 +8,7 @@ describe('step', () => { field: 'test', range: [0, 500], steps: [0, 500, 1000], + openUpperBound: false } it('checks if range is present and not empty', () => { @@ -21,10 +22,11 @@ describe('step', () => { expect(filter(input)).toEqual(expectedValue) }) - it('removes upper bound when range is last step', () => { + it('removes upper bound when open upper bound is true', () => { const inputWithNewRange = { ...input, range: [0, 1000], + openUpperBound: true, } let expectedValue = { range: { test: { gte: 0 } } } expect(filter(inputWithNewRange)).toEqual(expectedValue) @@ -38,7 +40,7 @@ describe('step', () => { }, }, } - let output = buildQuery(input.field, input.range, input.steps) + let output = buildQuery(input.field, input.range, input.openUpperBound) expect(output).toEqual(expectedDSL) }) })