Skip to content

Commit

Permalink
add tests for empty attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Sep 27, 2017
1 parent 554f003 commit 64438cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/core/compiler/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Compiler", function() {
it("should compile unclosed mustaches", function() {
createTestElement("compilerTemplateUnclosed", '{{msg');
new Moon({
root: "#compilerTemplateUnclosed",
root: "#compilerTemplateUnclosed"
});
});

Expand Down Expand Up @@ -96,6 +96,14 @@ describe("Compiler", function() {
expect(el.firstChild.textContent).to.equal("Moon");
});

it("should compile attributes with no value", function() {
var el = createTestElement("compilerEmptyAttributes", '<div test></div>');
new Moon({
root: "#compilerEmptyAttributes"
});
expect(el.firstChild.getAttribute("test")).to.equal("");
});

it("should compile and mark SVG elements", function() {
var el = createTestElement("compilerSVG", '');
var app = new Moon({
Expand Down

0 comments on commit 64438cd

Please sign in to comment.