Skip to content

Commit

Permalink
公开 isExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Jun 3, 2016
1 parent 3278fc6 commit ade2729
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,14 @@ describe('测试文件', function () {
var html = tpl.render(data);
expect(html).toEqual('<li>2</li>');
});

it('.isExpression', function () {
expect(Template.isExpression('a')).toEqual(false);
expect(Template.isExpression('{{a}}')).toEqual(true);
});

it('.textify', function () {
expect(Template.textify('a')).toEqual('"a"');
expect(Template.textify('"a"')).toEqual('"\\"a\\""');
});
});

0 comments on commit ade2729

Please sign in to comment.