adda0569e0
Allows for testing node, browser, and precompiled modes in the node tests. Also reorganizes the qunit spec file to provide better organization.
16 lines
441 B
JavaScript
16 lines
441 B
JavaScript
require('./common');
|
|
|
|
global.Handlebars = require('../../dist/handlebars.runtime');
|
|
|
|
var compiler = require('../../lib/handlebars');
|
|
|
|
global.CompilerContext = {
|
|
compile: function(template, options) {
|
|
var templateSpec = compiler.precompile(template, options);
|
|
return Handlebars.template(eval('(' + templateSpec + ')'));
|
|
},
|
|
compileWithPartial: function(template, options) {
|
|
return compiler.compile(template, options);
|
|
}
|
|
};
|