Skip to content

Commit

Permalink
[7.x] [Uptime] Mock implementation to account for math flakiness test (
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Nov 17, 2020
1 parent 4052c4c commit 3935938
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 3935938

Please sign in to comment.