mattdesl / canvas-sketch

[beta] A framework for making generative artwork in JavaScript and the browser.
MIT License
5.01k stars 393 forks source link

Add Unit Tests #110

Open helloitsjoe opened 3 years ago

helloitsjoe commented 3 years ago

Hi Matt!

I noticed in your readme you want to add unit tests - I've set up Jest for canvas-sketch and added a few basic tests just to get the ball rolling. I'm happy to add more but wanted to submit a PR early in case you have any feedback.

helloitsjoe commented 3 years ago

I had some time so I added a few more tests.

Also, It looks like the Netlify pipeline isn't passing because it's still on Node 8, but Jest 26/27 require Node 10 or above. I would downgrade to Jest 24, but it doesn't play as nicely with the canvas package (and also Node 8 is no longer supported)