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

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -