mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prettier: ran on all files again, sorry. now settings are defined in package.json
This commit is contained in:
@@ -31,9 +31,7 @@ describe('Annotations', () => {
|
||||
it('should cut regions to current time range', () => {
|
||||
const range = { from: 0, to: 8 };
|
||||
testAnnotations = [{ id: 5, time: 4, regionId: 5 }];
|
||||
const expectedAnnotations = [
|
||||
{ id: 5, regionId: 5, isRegion: true, time: 4, timeEnd: 7 },
|
||||
];
|
||||
const expectedAnnotations = [{ id: 5, regionId: 5, isRegion: true, time: 4, timeEnd: 7 }];
|
||||
|
||||
let regions = makeRegions(testAnnotations, { range: range });
|
||||
expect(regions).toEqual(expectedAnnotations);
|
||||
@@ -49,11 +47,7 @@ describe('Annotations', () => {
|
||||
{ id: 5, time: 5 },
|
||||
{ id: 5, time: 5 },
|
||||
];
|
||||
const expectedAnnotations = [
|
||||
{ id: 1, time: 1 },
|
||||
{ id: 2, time: 2 },
|
||||
{ id: 5, time: 5 },
|
||||
];
|
||||
const expectedAnnotations = [{ id: 1, time: 1 }, { id: 2, time: 2 }, { id: 5, time: 5 }];
|
||||
|
||||
let deduplicated = dedupAnnotations(testAnnotations);
|
||||
expect(deduplicated).toEqual(expectedAnnotations);
|
||||
@@ -67,11 +61,7 @@ describe('Annotations', () => {
|
||||
{ id: 5, time: 5 },
|
||||
{ id: 5, time: 5 },
|
||||
];
|
||||
const expectedAnnotations = [
|
||||
{ id: 1, time: 1 },
|
||||
{ id: 2, time: 2 },
|
||||
{ id: 5, time: 5 },
|
||||
];
|
||||
const expectedAnnotations = [{ id: 1, time: 1 }, { id: 2, time: 2 }, { id: 5, time: 5 }];
|
||||
|
||||
let deduplicated = dedupAnnotations(testAnnotations);
|
||||
expect(deduplicated).toEqual(expectedAnnotations);
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
describe,
|
||||
beforeEach,
|
||||
it,
|
||||
expect,
|
||||
angularMocks,
|
||||
} from 'test/lib/common';
|
||||
import { describe, beforeEach, it, expect, angularMocks } from 'test/lib/common';
|
||||
import '../annotations_srv';
|
||||
import helpers from 'test/specs/helpers';
|
||||
|
||||
@@ -33,10 +27,7 @@ describe('AnnotationsSrv', function() {
|
||||
let translatedAnnotations;
|
||||
|
||||
beforeEach(() => {
|
||||
translatedAnnotations = ctx.service.translateQueryResult(
|
||||
annotationSource,
|
||||
annotations
|
||||
);
|
||||
translatedAnnotations = ctx.service.translateQueryResult(annotationSource, annotations);
|
||||
});
|
||||
|
||||
it('should set defaults', () => {
|
||||
|
||||
Reference in New Issue
Block a user