Fuzz / monkey / gremlin testing

I’ve implemented some basic “gremlins” for fuzz testing ProseMirror with gremlins.js. It is fun to watch, and maybe easier than pounding on the keyboard with every change. I have not found any bugs with this tool.

Here is the code to implement: https://github.com/the-grid/ed/pull/261/files … using pm.tr feels like cheating a little bit… I should get around to simulating keyboard events on the contenteditable. pmFormatter does this for pressing buttons in the toolbar.

If anybody is interested in using these gremlins and developing them further I can pull them out to a separate project.

I had a fuzzer for the document model at some point, which caught a few bugs, but I let it bitrot and eventually removed it. I’ll probably bring something like that back at some point. Doing something similar for the DOM integration might be nice, but if we can’t use real browser events I’m not sure how much it adds.