File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,17 @@ describe("angularjsx", function () {
17
17
it ( "should convert JSX with quotes" , function ( ) {
18
18
assert . equal ( angularjsx . convert ( "var x = {template: <div class=\"foo\"></div>}" ) , "var x = {template: \"<div class=\\\"foo\\\"></div>\"}" ) ;
19
19
} ) ;
20
- it ( "should ignore non-JSX templates " , function ( ) {
20
+ it ( "should ignore non-JSX properties named 'template' " , function ( ) {
21
21
//TODO: \r\n on Windows only? Test on Linux.
22
22
assert . equal ( angularjsx . convert ( "var x = {template: {\n}}" ) , "var x = {template: {\r\n}}" ) ;
23
23
} ) ;
24
- it ( "should handle dots in span" , function ( ) {
24
+ it ( "should ignore string template" , function ( ) {
25
+ assert . equal ( angularjsx . convert ( "var x = {template: \"<br/>\"}" ) , "var x = {template: \"<br/>\"}" ) ;
26
+ } ) ;
27
+ it ( "should handle dots and curly braces in span" , function ( ) {
25
28
assert . equal ( angularjsx . convert ( "var x = {template: <span>{{a.b}}</span>}" ) , "var x = {template: \"<span>{{a.b}}</span>\"}" ) ;
26
29
} ) ;
30
+ it ( "should handle parentheses" , function ( ) {
31
+ assert . equal ( angularjsx . convert ( "var x = {template: (<br/>)}" ) , "var x = {template: (\"<br/>\")}" ) ;
32
+ } ) ;
27
33
} ) ;
You can’t perform that action at this time.
0 commit comments