react-code-input
react-code-input copied to clipboard
Snapshot testing impossible
Generated uuid/v4 id makes it impossible to use snapshot testing, I suggest to replace {this.uuid}+[incrementedCount] call in id of inputs to optional name prop like {[this.name]-[incrementedCount]}
Here is a workaround for those interested - Not solution though const mockMath = Object.create(global.Math); mockMath.random = () => 1; global.Math = mockMath;