Skip to content

Commit

Permalink
[Uptime] Mock implementation to account for math flakiness test (elas…
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Nov 17, 2020
1 parent 112e3c7 commit 0fe6568
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
import { getPingHistogram } from '../get_ping_histogram';
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants';
import { elasticsearchServiceMock } from '../../../../../../../src/core/server/mocks';
import * as intervalHelper from '../../helper/get_histogram_interval';

describe('getPingHistogram', () => {
beforeEach(() => {
jest.spyOn(intervalHelper, 'getHistogramInterval').mockReturnValue(36000);
});

const standardMockResponse: any = {
aggregations: {
timeseries: {
Expand Down Expand Up @@ -36,7 +41,7 @@ describe('getPingHistogram', () => {
},
};

it.skip('returns a single bucket if array has 1', async () => {
it('returns a single bucket if array has 1', async () => {
expect.assertions(2);
const mockEsClient = elasticsearchServiceMock.createElasticsearchClient();

Expand Down

0 comments on commit 0fe6568

Please sign in to comment.