Skip to content

Commit

Permalink
cleaned up naming
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Jan 2, 2020
1 parent 6223180 commit d1ef6ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface AlertUtilsOpts {
objectRemover?: ObjectRemover;
}

export interface CreateAlwaysFiringActionOpts {
export interface CreateAlertWithActionOpts {
indexRecordActionId?: string;
objectRemover?: ObjectRemover;
overwrites?: Record<string, any>;
Expand Down Expand Up @@ -159,7 +159,7 @@ export class AlertUtils {
overwrites = {},
indexRecordActionId,
reference,
}: CreateAlwaysFiringActionOpts) {
}: CreateAlertWithActionOpts) {
const objRemover = objectRemover || this.objectRemover;
const actionId = indexRecordActionId || this.indexRecordActionId;

Expand Down Expand Up @@ -213,7 +213,7 @@ export class AlertUtils {
overwrites = {},
indexRecordActionId,
reference,
}: CreateAlwaysFiringActionOpts) {
}: CreateAlertWithActionOpts) {
const objRemover = objectRemover || this.objectRemover;
const actionId = indexRecordActionId || this.indexRecordActionId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import expect from '@kbn/expect';

export function ensureDatetimeIsWithinRange(
scheduledRunTime: number,
date: number,
expectedDiff: number,
buffer: number = 10000
) {
const diff = scheduledRunTime - Date.now();
const diff = date - Date.now();
expect(diff).to.be.greaterThan(expectedDiff - buffer);
expect(diff).to.be.lessThan(expectedDiff + buffer);
}

0 comments on commit d1ef6ef

Please sign in to comment.