diff options
Diffstat (limited to 'test/CompilerSpec.js')
| -rw-r--r-- | test/CompilerSpec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CompilerSpec.js b/test/CompilerSpec.js index b9505192..ff576581 100644 --- a/test/CompilerSpec.js +++ b/test/CompilerSpec.js @@ -35,6 +35,15 @@ describe('compiler', function(){ dealoc(scope); }); + it('should not allow compilation of multiple roots', function(){ + expect(function(){ + compiler.compile('<div>A</div><span></span>'); + }).toThrow("Cannot compile multiple element roots: " + ie("<div>A</div><span></span>")); + function ie(text) { + return msie ? uppercase(text) : text; + } + }); + it('should recognize a directive', function(){ var e = jqLite('<div directive="expr" ignore="me"></div>'); directives.directive = function(expression, element){ |
