@@ -7,7 +7,7 @@ import "highcharts/highcharts-more";
77import "highcharts/modules/solid-gauge" ;
88import { CoreChartProps } from "../../../lib/components/core/interfaces" ;
99import {
10- fillDefaultsForGetItemProps ,
10+ fillDefaultsForgetItemOptions ,
1111 getChartLegendItems ,
1212 getLegendsProps ,
1313 getPointColor ,
@@ -80,7 +80,7 @@ describe("CoreChart: utils", () => {
8080 callback : ( api ) => ( chartApi = api ) ,
8181 } ) ;
8282
83- const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForGetItemProps ( undefined ) ) ;
83+ const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForgetItemOptions ( undefined ) ) ;
8484 expect ( items [ 0 ] . isSecondary ) . toBe ( axisOptions . opposite ) ;
8585 } ,
8686 ) ;
@@ -110,7 +110,7 @@ describe("CoreChart: utils", () => {
110110 callback : ( api ) => ( chartApi = api ) ,
111111 } ) ;
112112
113- const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForGetItemProps ( undefined ) ) ;
113+ const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForgetItemOptions ( undefined ) ) ;
114114 expect ( items ) . toHaveLength ( 2 ) ;
115115 expect ( items [ 0 ] . isSecondary ) . toBe ( false ) ;
116116 expect ( items [ 1 ] . isSecondary ) . toBe ( true ) ;
@@ -138,7 +138,7 @@ describe("CoreChart: utils", () => {
138138 callback : ( api ) => ( chartApi = api ) ,
139139 } ) ;
140140
141- const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForGetItemProps ( undefined ) ) ;
141+ const items = getChartLegendItems ( chartApi ! . chart , fillDefaultsForgetItemOptions ( undefined ) ) ;
142142
143143 if ( type === "gauge" || type === "solidgauge" ) {
144144 expect ( items ) . toHaveLength ( 1 ) ;
@@ -257,29 +257,29 @@ describe("CoreChart: utils", () => {
257257 } ) ;
258258 } ) ;
259259
260- describe ( "fillDefaultsForGetItemProps " , ( ) => {
260+ describe ( "fillDefaultsForgetItemOptions " , ( ) => {
261261 describe . each ( [
262262 {
263- scenario : "getItemProps is undefined" ,
264- getItemProps : undefined ,
263+ scenario : "getItemOptions is undefined" ,
264+ getItemOptions : undefined ,
265265 id : "item1" ,
266266 expected : { status : "default" , markerAriaDescription : undefined } ,
267267 } ,
268268 {
269- scenario : "getItemProps returns empty object" ,
270- getItemProps : ( ) => ( { } ) ,
269+ scenario : "getItemOptions returns empty object" ,
270+ getItemOptions : ( ) => ( { } ) ,
271271 id : "item1" ,
272272 expected : { status : "default" , markerAriaDescription : undefined } ,
273273 } ,
274274 {
275- scenario : "getItemProps returns status" ,
276- getItemProps : ( ) => ( { status : "warning" as const } ) ,
275+ scenario : "getItemOptions returns status" ,
276+ getItemOptions : ( ) => ( { status : "warning" as const } ) ,
277277 id : "item1" ,
278278 expected : { status : "warning" , markerAriaDescription : undefined } ,
279279 } ,
280280 {
281- scenario : "getItemProps returns status and contains i18n" ,
282- getItemProps : ( ) => ( { status : "warning" as const } ) ,
281+ scenario : "getItemOptions returns status and contains i18n" ,
282+ getItemOptions : ( ) => ( { status : "warning" as const } ) ,
283283 id : "item1" ,
284284 expected : { status : "warning" , markerAriaDescription : "hello hi" } ,
285285 options : {
@@ -288,18 +288,18 @@ describe("CoreChart: utils", () => {
288288 } ,
289289 } ,
290290 {
291- scenario : "getItemProps returns status and contains i18n - getI18nFromStatus returns undefined" ,
292- getItemProps : ( ) => ( { status : "warning" as const } ) ,
291+ scenario : "getItemOptions returns status and contains i18n - getI18nFromStatus returns undefined" ,
292+ getItemOptions : ( ) => ( { status : "warning" as const } ) ,
293293 id : "item1" ,
294294 expected : { status : "warning" , markerAriaDescription : undefined } ,
295295 options : {
296296 markerAriaDescriptionTemplate : "hello {status}" ,
297297 getI18nFromStatus : ( ) : undefined => undefined ,
298298 } ,
299299 } ,
300- ] ) ( "$scenario" , ( { getItemProps , id, expected, options } ) => {
300+ ] ) ( "$scenario" , ( { getItemOptions , id, expected, options } ) => {
301301 it ( "should return correct default values" , ( ) => {
302- const result = fillDefaultsForGetItemProps ( getItemProps , options ) ;
302+ const result = fillDefaultsForgetItemOptions ( getItemOptions , options ) ;
303303 expect ( result ( id ) ) . toEqual ( expected ) ;
304304 } ) ;
305305 } ) ;
0 commit comments