Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
This commit is contained in:
parent
ff6a5a856d
commit
4b9c159e57
|
@ -11,6 +11,19 @@ import React from 'react';
|
|||
import { act } from 'react-dom/test-utils';
|
||||
import { CustomStops, CustomStopsProps } from './color_stops';
|
||||
|
||||
// mocking random id generator function
|
||||
jest.mock('@elastic/eui', () => {
|
||||
const original = jest.requireActual('@elastic/eui');
|
||||
|
||||
return {
|
||||
...original,
|
||||
htmlIdGenerator: (fn: unknown) => {
|
||||
let counter = 0;
|
||||
return () => counter++;
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
describe('Color Stops component', () => {
|
||||
let props: CustomStopsProps;
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -15,6 +15,19 @@ import { CustomPaletteParams } from './types';
|
|||
import { applyPaletteParams } from './utils';
|
||||
import { CustomizablePalette } from './palette_configuration';
|
||||
|
||||
// mocking random id generator function
|
||||
jest.mock('@elastic/eui', () => {
|
||||
const original = jest.requireActual('@elastic/eui');
|
||||
|
||||
return {
|
||||
...original,
|
||||
htmlIdGenerator: (fn: unknown) => {
|
||||
let counter = 0;
|
||||
return () => counter++;
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
describe('palette utilities', () => {
|
||||
const paletteRegistry = chartPluginMock.createPaletteRegistry();
|
||||
describe('applyPaletteParams', () => {
|
||||
|
|
Loading…
Reference in a new issue