reactjs - testing React Highcharts config object with formatter callback -
i'm running issue using jest test helper function generates config object needed <reacthighcharts /> component. configs use formatter callback, expected object visually identical received object, test still fails. i'm sure formatter callback what's causing test fail -- commenting out gets test pass. how can test config?
formatter function, , needs mocked out in expected test object achieve object equality. in jest, can use formatter: expect.any(function),.
Comments
Post a Comment