summaryrefslogtreecommitdiffstats
path: root/spec/env/node.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/env/node.js')
-rw-r--r--spec/env/node.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/env/node.js b/spec/env/node.js
new file mode 100644
index 0000000..fe34f94
--- /dev/null
+++ b/spec/env/node.js
@@ -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);
+ }
+};