mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* WIP first attempt to query variable * regex issue repro demo * Refresh variable on time range change if refresh specified * Instantiate variable runner when updating query variable options * Simplify runners getTarget interface * Fix issue with variable ot being updated correctly after other variable changed * Add templateSrv.replace compatibility with query variable * QueryVariable: use datasource variable as source * use proper format * Make sure variables set is correctly updated when query variable errors * Do not destruct scopedVars when using sceneGraph.interpolate in templateSrv * Add support for Legacy variables (metricFindQuery) * Review * Fix lint * Test: Add unit for datasource by variable * test: Add unit for datasource as var * query: delegate interpolation to datasourceSrv * Cleanup Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
19 lines
444 B
TypeScript
19 lines
444 B
TypeScript
import '@testing-library/jest-dom';
|
|
import i18next from 'i18next';
|
|
import failOnConsole from 'jest-fail-on-console';
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
import { matchers } from './matchers';
|
|
|
|
failOnConsole({
|
|
shouldFailOnLog: true,
|
|
});
|
|
|
|
expect.extend(matchers);
|
|
|
|
i18next.use(initReactI18next).init({
|
|
resources: {},
|
|
returnEmptyString: false,
|
|
lng: 'en-US', // this should be the locale of the phrases in our source JSX
|
|
});
|