Skip to content

Commit

Permalink
unit test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
parkiino committed Jun 22, 2021
1 parent 9c3d27f commit 7226770
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { endpointAlertCheck } from './endpoint_alert_check';

describe('utils', () => {
describe('endpoinAlertCheck', () => {
it('should return true if detections data comes from an endpoint rule', () => {
expect(endpointAlertCheck(mockData)).toBeTruthy();
});
it('should return false if detections data does not come from endpoint rule', () => {
expect(endpointAlertCheck(mockDataWithout)).toBeFalsy();
});
});
});

0 comments on commit 7226770

Please sign in to comment.