diff --git a/test/template/a.jst b/test/template/a.jst
index a2a8b6e00..cca541d8f 100644
--- a/test/template/a.jst
+++ b/test/template/a.jst
@@ -1,3 +1,3 @@
-<% _.forEach(people, function(name) { %>- <%= name %>
<% }); %>
+<% _.forEach(people, function(name) { %>- <%- name %>
<% }); %>
\ No newline at end of file
diff --git a/test/test-build.js b/test/test-build.js
index 32ce035c1..62f4d3ebd 100644
--- a/test/test-build.js
+++ b/test/test-build.js
@@ -535,6 +535,8 @@
];
commands.forEach(function(command) {
+ var expectedId = /underscore/.test(command) ? 'underscore' : 'lodash';
+
asyncTest('`lodash template=*.jst` exports=amd' + (command ? ' ' + command : ''), function() {
var start = _.after(2, _.once(QUnit.start));
@@ -551,8 +553,10 @@
context.define.amd = {};
vm.runInContext(data.source, context);
- equal(moduleId, (command ? 'underscore' : 'lodash'), basename);
+ equal(moduleId, expectedId, basename);
ok('a' in _.templates && 'b' in _.templates, basename);
+ equal(_.templates.a({ 'people': ['moe', 'larry'] }), '', basename);
+
delete _.templates;
start();
});
@@ -578,7 +582,7 @@
context.define.amd = {};
vm.runInContext(data.source, context);
- equal(moduleId, (command ? 'underscore' : 'lodash'), basename);
+ equal(moduleId, expectedId, basename);
equal(_.templates.d(object.d), 'Hello Mustache!', basename);
delete _.templates;
start();