Skip to content

Commit

Permalink
fixed unit tests previously missed (opensearch-project#546) (opensear…
Browse files Browse the repository at this point in the history
…ch-project#548)

Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit d4f9003)

Co-authored-by: Amit Galitzky <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and amitgalitz authored Jul 11, 2023
1 parent 1aa653c commit 8db9210
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions public/expressions/__tests__/overlay_anomalies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ describe('overlay_anomalies spec', () => {
});
describe('convertAnomaliesToPointInTimeEventsVisLayer()', () => {
test('convert anomalies to PointInTimeEventsVisLayer', async () => {
const expectedTimeStamp =
PARSED_ANOMALIES[0].startTime +
(PARSED_ANOMALIES[0].endTime - PARSED_ANOMALIES[0].startTime) / 2;
const expectedTimeStamp = PARSED_ANOMALIES[0].startTime;
const expectedPointInTimeEventsVisLayer = {
events: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ exports[`<DetectorConfig /> spec renders the component 1`] = `
>
<div
class="euiBasicTable"
data-test-subj="featureTable"
>
<div>
<div
Expand Down Expand Up @@ -1727,6 +1728,7 @@ exports[`<DetectorConfig /> spec renders the component with 2 custom and 1 simpl
>
<div
class="euiBasicTable"
data-test-subj="featureTable"
>
<div>
<div
Expand Down
10 changes: 5 additions & 5 deletions public/pages/utils/__tests__/anomalyResultUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import {
getFeatureMissingDataAnnotations,
getFeatureDataPointsForDetector,
Expand All @@ -22,7 +22,7 @@ import {
AnomalyData,
} from '../../../models/interfaces';
import { ANOMALY_RESULT_SUMMARY, PARSED_ANOMALIES } from './constants';

describe('anomalyResultUtils', () => {
let randomDetector_20_min: Detector;
let randomDetector_20_sec: Detector;
Expand Down Expand Up @@ -50,7 +50,7 @@ describe('anomalyResultUtils', () => {
},
] as FeatureAttributes[],
};

randomDetector_20_sec = {
...getRandomDetector(true),
detectionInterval: {
Expand Down Expand Up @@ -570,7 +570,7 @@ describe('anomalyResultUtils', () => {
).toEqual([]);
});
});

describe('parsePureAnomalies()', () => {
test('parse anomalies', async () => {
const parsedPureAnomalies: AnomalyData[] = await parsePureAnomalies(
Expand All @@ -579,4 +579,4 @@ describe('anomalyResultUtils', () => {
expect(parsedPureAnomalies).toStrictEqual(PARSED_ANOMALIES);
});
});
});
});

0 comments on commit 8db9210

Please sign in to comment.