You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is really well-laid out already, so it shouldn't be much work to make it testable. Some thoughts:
The testing may need to be done in-browser, because of the dependency on the canvas element. JsUnit should work for that.
Testing should also be possible (at least mostly) in Node.js, without a browser. JsUnit is not the right choice for this.
The testing framework should support asynchronous tests; melonJS is asynchronous by its very nature of being a game engine.
The testing framework must be extensible enough to support custom assertions. For example, an assertion that compares a canvas context to a pre-rendered "expected" image.
I found such a framework that will probably work great, called Tree.js. It has an excellent architecture and documentation. It was also designed with asynchronous assertions in mind, which is imperative for us. And [not documented but] it can be very easily extended with custom assertions.
The text was updated successfully, but these errors were encountered:
This will especially become important when working on #101, I think. And also #96, because I don't do a lot of testing with isometric maps (actually none!) Having automated tests would be really, really, really nice for these areas.
Linking as well with ticket #80 and #47, which is about using grunt for the build system and enable Lint for code checking, and since it is about ensuring a clean code and avoid regression again (through Lint)
The code is really well-laid out already, so it shouldn't be much work to make it testable. Some thoughts:
I found such a framework that will probably work great, called Tree.js. It has an excellent architecture and documentation. It was also designed with asynchronous assertions in mind, which is imperative for us. And [not documented but] it can be very easily extended with custom assertions.
The text was updated successfully, but these errors were encountered: