diff --git a/ui/test/dashboards/reducers/ui.test.ts b/ui/test/dashboards/reducers/ui.test.ts index 5b3acd39d..3ec40819d 100644 --- a/ui/test/dashboards/reducers/ui.test.ts +++ b/ui/test/dashboards/reducers/ui.test.ts @@ -68,7 +68,7 @@ describe('DataExplorer.Reducers.UI', () => { it('can delete a dashboard', () => { const actual = reducer({...initialState, dashboards}, deleteDashboard(d1)) - const expected = dashboards.filter(dash => dash.id !== d1.id) + const expected = dashboards.filter((dash) => dash.id !== d1.id) expect(actual.dashboards).toEqual(expected) }) diff --git a/ui/test/kapacitor/utils/ActiveKapacitorFromSources.ts b/ui/test/kapacitor/utils/ActiveKapacitorFromSources.ts index c9ca1c934..9117b2d2c 100644 --- a/ui/test/kapacitor/utils/ActiveKapacitorFromSources.ts +++ b/ui/test/kapacitor/utils/ActiveKapacitorFromSources.ts @@ -2,10 +2,10 @@ import ActiveKapacitorFromSources from 'src/kapacitor/utils/ActiveKapacitorFromS import {source, kapacitor} from 'mocks/dummy' describe('ActiveKapacitorFromSources', () => { - const createSource = attrs => ({...source, ...attrs}) - const createKapacitor = attrs => ({...kapacitor, ...attrs}) + const createSource = (attrs) => ({...source, ...attrs}) + const createKapacitor = (attrs) => ({...kapacitor, ...attrs}) - const setup = overrides => { + const setup = (overrides) => { const activeSource = createSource({id: 1, ...overrides}) const sources = [ diff --git a/ui/test/kapacitor/utils/alertMessageValidation.test.ts b/ui/test/kapacitor/utils/alertMessageValidation.test.ts index 9e1d00772..01551c3a3 100644 --- a/ui/test/kapacitor/utils/alertMessageValidation.test.ts +++ b/ui/test/kapacitor/utils/alertMessageValidation.test.ts @@ -63,7 +63,7 @@ describe('kapacitor.utils.alertMessageValidation', () => { 'CI ID = {{ with (index .Tags "ci_id") }}{{ . }}{{ else }}Unknown{{ end }}', 'CI ID = {{ if (index .Tags "ci_id") }}{{ index .Tags "ci_id" }}{{ else -}} Unknown {{- end }}', '# of Tags = {{ len .Tags }}', - ].forEach(m => { + ].forEach((m) => { it(`#5343 accepts message '${m}'`, () => { const isValid = isValidMessage(m) expect(isValid).toEqual(true) diff --git a/ui/test/logs/utils/index.test.ts b/ui/test/logs/utils/index.test.ts index 62aa0af0f..737a08d70 100644 --- a/ui/test/logs/utils/index.test.ts +++ b/ui/test/logs/utils/index.test.ts @@ -11,13 +11,19 @@ describe('parseHistogramQueryResponse', () => { name: 'syslog', tags: {severity: 'debug'}, columns: ['time', 'count'], - values: [[1530129062000, 0], [1530129093000, 0]], + values: [ + [1530129062000, 0], + [1530129093000, 0], + ], }, { name: 'syslog', tags: {severity: 'err'}, columns: ['time', 'count'], - values: [[1530129062000, 0], [1530129093000, 0]], + values: [ + [1530129062000, 0], + [1530129093000, 0], + ], }, ], }, diff --git a/ui/test/logs/utils/table.test.ts b/ui/test/logs/utils/table.test.ts index dee19a1ce..344af6532 100644 --- a/ui/test/logs/utils/table.test.ts +++ b/ui/test/logs/utils/table.test.ts @@ -4,11 +4,17 @@ describe('Logs.Utils.Table', () => { const infiniteTableData = { forward: { columns: ['time', 'noise'], - values: [[8, 'beep'], [7, 'boop']], + values: [ + [8, 'beep'], + [7, 'boop'], + ], }, backward: { columns: ['time', 'noise'], - values: [[6, 'bloop'], [5, 'bleep']], + values: [ + [6, 'bloop'], + [5, 'bleep'], + ], }, } diff --git a/ui/test/shared/reducers/sources.test.ts b/ui/test/shared/reducers/sources.test.ts index 3b3915925..43f41a667 100644 --- a/ui/test/shared/reducers/sources.test.ts +++ b/ui/test/shared/reducers/sources.test.ts @@ -34,7 +34,7 @@ describe('Shared.Reducers.sources', () => { }) ) - expect(state.filter(s => s.default).length).toBe(1) + expect(state.filter((s) => s.default).length).toBe(1) }) it('can correctly show default sources when updating a source', () => { diff --git a/ui/test/tempVars/utils/graph.test.ts b/ui/test/tempVars/utils/graph.test.ts index 052912bb8..4ced08865 100644 --- a/ui/test/tempVars/utils/graph.test.ts +++ b/ui/test/tempVars/utils/graph.test.ts @@ -122,11 +122,11 @@ describe('topologicalSort', () => { ] const graph = graphFromTemplates(templates) - const a = graph.find(n => n.initialTemplate.id === 'a') - const b = graph.find(n => n.initialTemplate.id === 'b') - const c = graph.find(n => n.initialTemplate.id === 'c') - const d = graph.find(n => n.initialTemplate.id === 'd') - const e = graph.find(n => n.initialTemplate.id === 'e') + const a = graph.find((n) => n.initialTemplate.id === 'a') + const b = graph.find((n) => n.initialTemplate.id === 'b') + const c = graph.find((n) => n.initialTemplate.id === 'c') + const d = graph.find((n) => n.initialTemplate.id === 'd') + const e = graph.find((n) => n.initialTemplate.id === 'e') const sorted = topologicalSort(graph) @@ -247,15 +247,15 @@ describe('graphFromTemplates', () => { ] const graph = graphFromTemplates(templates) - const a = graph.find(n => n.initialTemplate === templates[0]) - const b = graph.find(n => n.initialTemplate === templates[1]) - const c = graph.find(n => n.initialTemplate === templates[2]) - const d = graph.find(n => n.initialTemplate === templates[3]) - const e = graph.find(n => n.initialTemplate === templates[4]) - const f = graph.find(n => n.initialTemplate === templates[5]) - const g = graph.find(n => n.initialTemplate === templates[6]) - const h = graph.find(n => n.initialTemplate === templates[7]) - const i = graph.find(n => n.initialTemplate === templates[8]) + const a = graph.find((n) => n.initialTemplate === templates[0]) + const b = graph.find((n) => n.initialTemplate === templates[1]) + const c = graph.find((n) => n.initialTemplate === templates[2]) + const d = graph.find((n) => n.initialTemplate === templates[3]) + const e = graph.find((n) => n.initialTemplate === templates[4]) + const f = graph.find((n) => n.initialTemplate === templates[5]) + const g = graph.find((n) => n.initialTemplate === templates[6]) + const h = graph.find((n) => n.initialTemplate === templates[7]) + const i = graph.find((n) => n.initialTemplate === templates[8]) expect(new Set(a.parents)).toEqual(new Set([])) expect(new Set(a.children)).toEqual(new Set([b, c])) @@ -384,7 +384,7 @@ describe('hydrateTemplates', () => { const result = await hydrateTemplates(templates, [], {fetcher: fakeFetcher}) - expect(result.find(t => t.id === 'a').values).toContainEqual({ + expect(result.find((t) => t.id === 'a').values).toContainEqual({ value: 'success', type: TemplateValueType.MetaQuery, selected: true, diff --git a/ui/test/utils/influxql.test.ts b/ui/test/utils/influxql.test.ts index 69a1ffb68..43b28883f 100644 --- a/ui/test/utils/influxql.test.ts +++ b/ui/test/utils/influxql.test.ts @@ -195,7 +195,10 @@ describe('buildInfluxQLQuery', () => { database: 'db1', retentionPolicy: 'rp1', measurement: 'm0', - fields: [{value: 'f0', type: 'field'}, {value: 'f1', type: 'field'}], + fields: [ + {value: 'f0', type: 'field'}, + {value: 'f1', type: 'field'}, + ], }) timeBounds = {upper: "'2015-02-24T00:00:00Z'"} }) diff --git a/ui/test/utils/timeSeriesTransformers.test.ts b/ui/test/utils/timeSeriesTransformers.test.ts index de235cef0..90a21c451 100644 --- a/ui/test/utils/timeSeriesTransformers.test.ts +++ b/ui/test/utils/timeSeriesTransformers.test.ts @@ -28,7 +28,10 @@ describe('timeSeriesToDygraph', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -38,7 +41,10 @@ describe('timeSeriesToDygraph', () => { { name: 'm1', columns: ['time', 'f2'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -80,7 +86,11 @@ describe('timeSeriesToDygraph', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[100, 1], [3000, 3], [200, 2]], + values: [ + [100, 1], + [3000, 3], + [200, 2], + ], }, ], }, @@ -93,7 +103,11 @@ describe('timeSeriesToDygraph', () => { const expected = { labels: ['time', 'm1.f1'], - timeSeries: [[new Date(100), 1], [new Date(200), 2], [new Date(3000), 3]], + timeSeries: [ + [new Date(100), 1], + [new Date(200), 2], + [new Date(3000), 3], + ], } expect(actual.timeSeries).toEqual(expected.timeSeries) @@ -110,7 +124,10 @@ describe('timeSeriesToDygraph', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -126,7 +143,10 @@ describe('timeSeriesToDygraph', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -164,7 +184,10 @@ describe('timeSeriesToDygraph', () => { { name: 'mb', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -174,7 +197,10 @@ describe('timeSeriesToDygraph', () => { { name: 'ma', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -184,7 +210,10 @@ describe('timeSeriesToDygraph', () => { { name: 'mc', columns: ['time', 'f2'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -194,7 +223,10 @@ describe('timeSeriesToDygraph', () => { { name: 'mc', columns: ['time', 'f1'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -222,7 +254,11 @@ it('parses a single field influxQL query', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[100, 1], [3000, 3], [200, 2]], + values: [ + [100, 1], + [3000, 3], + [200, 2], + ], }, ], }, @@ -233,7 +269,12 @@ it('parses a single field influxQL query', () => { const actual = timeSeriesToTableGraph(influxResponse) - const expected = [['time', 'm1.f1'], [100, 1], [200, 2], [3000, 3]] + const expected = [ + ['time', 'm1.f1'], + [100, 1], + [200, 2], + [3000, 3], + ] expect(actual.data).toEqual(expected) expect(actual.influxQLQueryType).toEqual(InfluxQLQueryType.DataQuery) @@ -788,7 +829,11 @@ it('errors when both meta query and data query response', () => { { name: 'm1', columns: ['time', 'f1'], - values: [[100, 1], [3000, 3], [200, 2]], + values: [ + [100, 1], + [3000, 3], + [200, 2], + ], }, ], }, @@ -812,7 +857,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mb', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -822,7 +870,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'ma', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -832,7 +883,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mc', columns: ['time', 'f2'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -842,7 +896,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mc', columns: ['time', 'f1'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -873,7 +930,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mb', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -883,7 +943,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'ma', columns: ['time', 'f1'], - values: [[1000, 1], [2000, 2]], + values: [ + [1000, 1], + [2000, 2], + ], }, ], }, @@ -893,7 +956,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mc', columns: ['time', 'f2'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -903,7 +969,10 @@ describe('timeSeriesToTableGraph', () => { { name: 'mc', columns: ['time', 'f1'], - values: [[2000, 3], [4000, 4]], + values: [ + [2000, 3], + [4000, 4], + ], }, ], }, @@ -1124,7 +1193,12 @@ describe('transformTableData', () => { decimalPlaces ) - const expected = [['time', 'f2'], [1000, 2000], [2000, 3000], [3000, 1000]] + const expected = [ + ['time', 'f2'], + [1000, 2000], + [2000, 3000], + [3000, 1000], + ] expect(actual.transformedData).toEqual(expected) }) @@ -1161,7 +1235,12 @@ describe('transformTableData', () => { decimalPlaces ) - const expected = [['time', 'f2'], [2000, 3000], [3000, 1000], [1000, 2000]] + const expected = [ + ['time', 'f2'], + [2000, 3000], + [3000, 1000], + [1000, 2000], + ] expect(actual.transformedData).toEqual(expected) }) @@ -1241,7 +1320,10 @@ describe('if verticalTimeAxis is false', () => { decimalPlaces ) - const expected = [['time', 2000, 3000, 1000], ['f2', 3000, 1000, 2000]] + const expected = [ + ['time', 2000, 3000, 1000], + ['f2', 3000, 1000, 2000], + ] expect(actual.transformedData).toEqual(expected) })