Hi Dr Nic,
many thanks for this nifty tool, certainly a nice addition to JS land,
especially with JsUnit out of date, not too mention the project
generators and pretty results tables you can get!
So I have a few queries really so here goes:
- Any chance of adding in the ability for the distributed file to be
linted and compressed, then unit tested? I realise we can do this
manually (I'm no command-line ninja), but what about a few flags for
the rake dist generator, to execute linting and/or compressiong as
requested?
- In the jsunittest file there is no assertType method, though it is
mentioned by Thomas Fulchs in his talk. Is there a reason for this?
assertInstanceOf isn't quite up to type checking for objects, and
although it's easy to use just assert or assertEquals for the same
thing I quite like the idea of having a separate method to stop type
coercion.
How about this?
assertType: function(expected, actual, message) {
message = this.buildMessage(message || 'assertInstanceOf', '<?>
was not an instance of the expected type', actual);
this.assertBlock(message, function() { return actual.constructor
=== expected });
}
Seems to work in the following cases:
assertType(Object, {}, "True" );
assertType(Array, [], "True" );
assertType(Object, [], "False" );
- Finally a question about continuous integration (http://
en.wikipedia.org/wiki/Continuous_Integration)
The dev team where I work are hoping to integrate unit tests of JS
files into their continuous integration process. Do you think this is
possible with the output from running rake test_functionals?
Many thanks for your work on this, looking forward to future
updates :-)