Skip to content

Commit f7538f2

Browse files
authored
[Monitoring] Migrate karma tests (#75301) (#75433)
* Move to jest * More tests
1 parent b50c90e commit f7538f2

22 files changed

+127
-480
lines changed

x-pack/plugins/monitoring/public/components/chart/__tests__/get_color.js renamed to x-pack/plugins/monitoring/public/components/chart/get_color.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { getColor } from '../get_color';
8+
import { getColor } from './get_color';
99

1010
describe('getColors', function () {
1111
it('elasticsearch colors', () => {

x-pack/plugins/monitoring/public/components/chart/__tests__/get_last_value.js renamed to x-pack/plugins/monitoring/public/components/chart/get_last_value.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { getLastValue } from '../get_last_value';
8+
import { getLastValue } from './get_last_value';
99

1010
describe('monitoringChartGetLastValue', function () {
1111
it('getLastValue for single number', () => {

x-pack/plugins/monitoring/public/components/chart/__tests__/get_title.js renamed to x-pack/plugins/monitoring/public/components/chart/get_title.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { getTitle } from '../get_title';
8+
import { getTitle } from './get_title';
99

1010
describe('getTitle', function () {
1111
it('with metric.title', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import expect from '@kbn/expect';
88
import sinon from 'sinon';
9-
import { findIndexByX, getValuesByX, getValuesForSeriesIndex } from '../get_values_for_legend';
9+
import { findIndexByX, getValuesByX, getValuesForSeriesIndex } from './get_values_for_legend';
1010

1111
describe('monitoringChartHelpers', function () {
1212
it('getValuesForSeriesIndex sets does not impact callback without series', () => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import expect from '@kbn/expect';
88
import sinon from 'sinon';
9-
import { Config } from '../config';
10-
import { Graph } from '../graph';
9+
import { Config } from './config';
10+
import { Graph } from './graph';
1111

1212
describe('Config class', () => {
1313
let configJson;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { BooleanEdge } from '../boolean_edge';
9-
import { Edge } from '../edge';
8+
import { BooleanEdge } from './boolean_edge';
9+
import { Edge } from './edge';
1010

1111
describe('BooleanEdge', () => {
1212
let graph;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { Edge } from '../edge';
8+
import { Edge } from './edge';
99

1010
describe('Edge', () => {
1111
let graph;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { edgeFactory } from '../edge_factory';
9-
import { Edge } from '../edge';
10-
import { BooleanEdge } from '../boolean_edge';
8+
import { edgeFactory } from './edge_factory';
9+
import { Edge } from './edge';
10+
import { BooleanEdge } from './boolean_edge';
1111

1212
describe('edgeFactory', () => {
1313
let graph;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { IfVertex } from '../if_vertex';
9-
import { Vertex } from '../vertex';
8+
import { IfVertex } from './if_vertex';
9+
import { Vertex } from './vertex';
1010

1111
describe('IfVertex', () => {
1212
let graph;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { Graph } from '../';
9-
import { Vertex } from '../vertex';
10-
import { PluginVertex } from '../plugin_vertex';
11-
import { Edge } from '../edge';
8+
import { Graph } from './';
9+
import { Vertex } from './vertex';
10+
import { PluginVertex } from './plugin_vertex';
11+
import { Edge } from './edge';
1212

1313
describe('Graph', () => {
1414
let graphJson;

0 commit comments

Comments
 (0)