import { gaugeFunction } from './gauge_function' ; import type { GaugeArguments } from '..' ; import { functionWrapper } from '../../../../expressions/common/expression_functions/specs/tests/utils' ; import { Datatable } from '../../../../expressions/common/expression_types/specs' ; describe ( 'interpreter/functions#gauge' , ( ) => { const fn = functionWrapper ( gaugeFunction ( ) ) ; const context = { type : 'datatable' , rows : [ { 'col-0-1' : 0 } ] , columns : [ { id : 'col-0-1' , name : 'Count' , meta : { type : 'number' } } , { id : 'col-1-2' , name : 'Dest' , meta : { type : 'string' } } , ] , } ; const args = { ticksPosition : 'auto' , labelMajorMode : 'custom' , labelMajor : 'title' , shape : 'horizontalBullet' , colorMode : 'none' , minAccessor : 'col-1-2' , metricAccessor : 'col-0-1' , } ; it ( 'returns an object with the correct structure' , ( ) => { const actual = fn ( context , args , undefined ) ; expect ( actual ) . toMatchSnapshot ( ) ; } ) ; } ) ;