phronmophobic/membrane

Improve testing support for `membrane.webgl` backend.

phronmophobic opened this issue · 2 comments

Loading the membrane.webgl namespace will throw an exception if some of the browser APIs are missing. This makes it annoying for writing/running tests outside of the browser environment.

Also, on principle, it probably shouldn't throw an exception when loading the namespace regardless of whether the broswer APIs are available.

Some ideas for suggestions for fixes/improvements:

  • Write all the membrane.webgl code against a protocol so that it can be mocked/substituted
  • use delays for any top level definitions