react-final-form-arrays icon indicating copy to clipboard operation
react-final-form-arrays copied to clipboard

Add property based tests

Open maciejmyslinski opened this issue 6 years ago • 4 comments

Hey!

First of: I know asking to add 500 LOC to an OS library is a lot. I want you to understand well the motivation behind this change and the value of those tests.

I noticed that people reported similar issues to final-form-arrays repository, like this and this. At the time I was researching property-based testing and decided to give it a shot. One weekend later I was done with tests present in this PR. Those tests found the following issues:

  • https://github.com/final-form/final-form-arrays/issues/17
  • https://github.com/final-form/final-form-arrays/issues/18
  • https://github.com/final-form/final-form-arrays/issues/21
  • https://github.com/final-form/final-form-arrays/issues/22
  • https://github.com/final-form/final-form-arrays/issues/23
  • https://github.com/final-form/final-form-arrays/issues/24
  • https://github.com/final-form/final-form-arrays/issues/25

I explained the idea behind those tests during Frontend Con 2018. You can see this public talk here.

maciejmyslinski avatar Feb 04 '19 22:02 maciejmyslinski

Wow! A PR accompanied by a conference talk!

I'm not going to merge this right now, but I will check out this branch and see if I can address the bugs it raises. Thank you for this!

erikras avatar Mar 29 '19 14:03 erikras

Hey man. Finally getting back to this. I think I may have stopped watching your talk after I'd concluded that you had a good point, but before you called out this library and PR specifically. Great job, again!

The OOP nature of the test was initially very off-putting, as I have not thought in OOP in years, but I've finally got my head around it, and love how it's generating specific failing tests for me. I'll be fixing them over the coming days.

This library will be immeasurably better for your contribution.

erikras avatar Jul 11 '19 14:07 erikras

Okay, all the issues you've linked to have been fixed/resolved.

However, I don't think I can merge this PR, because it's still breaking for reasons that I think are problems with the test rather than the library.

erikras avatar Jul 15 '19 17:07 erikras

Thank you for resolving those issues. I hope all users of this library and users of apps build with it will now have a better experience using it.

I really appreciate all the time you took to build and maintain final-form. I'll take a closer look at this test in the coming days in an attempt to make it pass.

maciejmyslinski avatar Jul 30 '19 09:07 maciejmyslinski