Assuming you mean normal JavaScript unit tests, where you can check whether some variable is in state A or state B… personally I like Ava or Tape. For me Jest is too complicated, and not worth it unless you’re testing frontend components. If it’s important that tests run in a web browser, there’s Tape Run, but most of the newer test frameworks aren’t very good at this, and going back to something older like MochaJS might make sense.
Example with Tape here:
If you need to instantiate renderers, controls, or other things that rely on the DOM, it gets a bit more complicated and you may want additional tools like jsdom (to mock the browser environment in Node.js) or sinon (to stub out methods on objects).
I’d try to avoid running actual WebGL in tests, unless it’s absolutely essential to what you’re testing. Tools like Cypress can help with screenshot tests, but require more work than traditional unit tests.