mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Make compiled templates more debuggable.
Former-commit-id: aba1aa3efcea6695632aae0eb61148aa3174debd
This commit is contained in:
@@ -734,6 +734,15 @@
|
||||
deepEqual(options, {});
|
||||
});
|
||||
|
||||
test('should be debuggable if compiled with errors', function() {
|
||||
var source = _.template('<% if x %>').source;
|
||||
ok(source.indexOf('__p') > -1);
|
||||
});
|
||||
|
||||
test('should raise an error if a template, compiled with errors, is executed', function() {
|
||||
raises(_.template('<% if x %>'));
|
||||
});
|
||||
|
||||
test('should work with complex "interpolate" delimiters', function() {
|
||||
_.each({
|
||||
'<%= a + b %>': '3',
|
||||
|
||||
Reference in New Issue
Block a user