janl/mustache.js — pull request #301 by danielfagerstrom (2013-03-16 10:13:35+00:00)
Title: Mustache specs

Testing against the [Mustache spec](http://github.com/mustache/spec).

There is an earlier pull request for the [same topic](http://github.com/janl/mustache.js/pull/99), but that is against a very old version of mustache.js.

A couple of tests checking white space behavior and most of the optional lambda test fails against current mustache.js. To avoid breaking the build, ```it.skip``` is used for the failing tests they can be runned by setting the environment variable ```NOSKIP=true```.

For the lambda tests I choose to embed all js functions with a function taking no argument, e.g.:

function() { return function(txt) { return "__" + txt + "__" }; }

for the function

function(txt) { return "__" + txt + "__" }

from the spec. This is following current behavior for functions in mustache.js, the description in [manual(5)](http://mustache.github.com/mustache.5.html), and @pvande do the lambda testing [that way](http://github.com/pvande/Milk/blob/master/Cakefile#L138) in [Milk](http://github.com/pvande/Milk).