Refactor qunit unit tests
Allows for testing node, browser, and precompiled modes in the node tests. Also reorganizes the qunit spec file to provide better organization.
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
require('./common');
|
||||
|
||||
global.Handlebars = require('../../lib/handlebars');
|
||||
|
||||
global.CompilerContext = {
|
||||
compile: function(template, options) {
|
||||
var templateSpec = Handlebars.precompile(template, options);
|
||||
return Handlebars.template(eval('(' + templateSpec + ')'));
|
||||
},
|
||||
compileWithPartial: function(template, options) {
|
||||
return Handlebars.compile(template, options);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user