react-code-input icon indicating copy to clipboard operation
react-code-input copied to clipboard

Snapshot testing impossible

Open kembala opened this issue 6 years ago • 1 comments

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]}

kembala avatar Sep 10 '19 18:09 kembala

Here is a workaround for those interested - Not solution though const mockMath = Object.create(global.Math); mockMath.random = () => 1; global.Math = mockMath;

kembala avatar Oct 07 '19 03:10 kembala