-
Notifications
You must be signed in to change notification settings - Fork 6
Description
As L5 grows, it’s going to become harder to ensure that new changes aren’t breaking existing functionality. Since we currently have no automated tests, we're essentially "flying blind" on regressions. I am thinking of two testing strategies that make sense for L5.
-
Unit Testing: We need a way to verify that individual functions like math and state management behave as expected.
-
Visual Regression / Example Runner: Since this is a processing-like repo, the most important output is the canvas. A unit test can’t easily tell if a circle is being rendered with the wrong offset.
In essence we need the test runner to execute a subset of the scripts in /examples (only deterministic examples that have the same output on every run), captures the frame buffer, and compares it against a "Golden Master" (a known good reference image).
As for the testing framework, I have not delved deep into so take this with a grain of salt but I think busted is a strong choice. It says it's a unit-tester but really it can be used as an orchestrator. This way one framework can be used for both testing strategies.