diff --git a/test/exbars.js b/test/exbars.js
index 8a2771d..f4501fb 100644
--- a/test/exbars.js
+++ b/test/exbars.js
@@ -45,6 +45,7 @@ describe('Exbars', function() {
exbars.compile('someTemplate', '
{{title}}
');
exbars.compile('templateWithHelper', "{{someHelper 'hello'}}
");
exbars.compile('templateWithPartial', "{{partial 'some_partial'}}
");
+ exbars.compile('templateWithNFPartial', "{{partial 'not_found_partial'}}
");
exbars.compile(exbars.viewsPath + '/layouts/main.hbs', '{{{body}}}
');
exbars.compile(exbars.viewsPath + '/layouts/other.hbs', '');
exbars.registerHelper('someHelper', function(string) { return string.toUpperCase(); });
@@ -110,5 +111,12 @@ describe('Exbars', function() {
done();
});
});
+
+ it('should throw an error if partial is not found', function() {
+ var fn = function() {
+ exbars.render('templateWithNFPartial', {}, function(err, result) {});
+ };
+ fn.should.throw('Failed to lookup partial "not_found_partial" in: pages/login.hbs');
+ });
});
});
\ No newline at end of file