thywill
Version:
A Node.js clustered framework for single page web applications based on asynchronous messaging.
26 lines (23 loc) • 640 B
JavaScript
/**
* @fileOverview
* Batches for testing the HandlebarsTemplateEngine class.
*/
var assert = require('assert');
/**
* Add general tests for the HandlebarsTemplateEngine class to the suite.
*/
exports.general = function (suite) {
suite.addBatch({
'handlebarsTemplateEngine#render': {
topic: function () {
var template = '<div>{{name}}</div>';
return suite.thywills[0].templateEngine.render(template, {
name: 'value'
});
},
'template renders correctly': function (rendered) {
assert.equal(rendered, '<div>value</div>');
}
}
});
};