Open
Description
Seen in the StackedBar
component, which gets a clippath id from XYComponentCore
https://github.com/f5/unovis/blob/main/packages/ts/src/containers/xy-container/index.ts#L51
I was adding DOM snapshot tests for a react page using StackedBar
with react-testing-library snapshots and vitest, but a clippath
id was different on every test run, so it would fail the snapshot comparison.
As a workaround you can mock crypto.getRandomValues
that is used in the guid
util function (https://github.com/f5/unovis/blob/main/packages/ts/src/utils/misc.ts#L6), but it would be good for snapshot testing to work out of the box and I don't know that these ids need to be random guids.
Metadata
Metadata
Assignees
Labels
No labels