Skip to content

Commit

Permalink
test unclosed mustaches
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Sep 27, 2017
1 parent a05cc3b commit 554f003
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/core/compiler/compiler.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
describe("Compiler", function() {
it("should compile whitespace in mustaches", function() {
var el = createTestElement("compilerMustacheWhitespace", '{{ msg }}');
it("should compile whitespace in templates", function() {
var el = createTestElement("compilerTemplateWhitespace", '{{ msg }}');
var app = new Moon({
root: "#compilerMustacheWhitespace",
root: "#compilerTemplateWhitespace",
data: {
msg: "Hello Moon!"
}
});
expect(el.innerHTML).to.equal("Hello Moon!");
});

it("should compile unclosed mustaches", function() {
createTestElement("compilerTemplateUnclosed", '{{msg');
new Moon({
root: "#compilerTemplateUnclosed",
});
});

it("should not compile comments", function() {
var el = createTestElement("compilerComment", '<!-- comment -->');
var compilerCommentApp = new Moon({
Expand Down

0 comments on commit 554f003

Please sign in to comment.