Skip to content

Commit

Permalink
Updating tests to reflect the changes by adding the delay
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Oct 16, 2023
1 parent b487618 commit 3b5bf3c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 69 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

import { createBurnRateRule } from '../fixtures/rule';
import { buildQuery } from './build_query';
import { createKQLCustomIndicator, createSLO } from '../../../../services/slo/fixtures/slo';
import {
createKQLCustomIndicator,
createSLO,
createSLOWithTimeslicesBudgetingMethod,
} from '../../../../services/slo/fixtures/slo';

const STARTED_AT = new Date('2023-01-01T00:00:00.000Z');

Expand All @@ -29,10 +33,9 @@ describe('buildQuery()', () => {
expect(buildQuery(STARTED_AT, slo, rule, { instanceId: 'example' })).toMatchSnapshot();
});
it('should return a valid query for timeslices', () => {
const slo = createSLO({
const slo = createSLOWithTimeslicesBudgetingMethod({
id: 'test-slo',
indicator: createKQLCustomIndicator(),
budgetingMethod: 'timeslices',
});
const rule = createBurnRateRule(slo);
expect(buildQuery(STARTED_AT, slo, rule)).toMatchSnapshot();
Expand Down
Loading

0 comments on commit 3b5bf3c

Please sign in to comment.