Skip to content

Commit

Permalink
add test that content is live
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Dec 13, 2024
1 parent 3fb0888 commit bccdfa3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/commands/append.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe("the append command", function () {
clearWorkArea();
});
afterEach(function () {
clearWorkArea();
});

it("can append a string to another string", function () {
Expand Down Expand Up @@ -87,4 +88,13 @@ describe("the append command", function () {
btn.parentNode.should.equal(div);
})

it("new content added by append will be live", function () {
var div = make(`<div _="on click append \`<button id='b1' _='on click increment window.temp'>Test</button>\` to me"></div>`);
div.click();
let btn = byId('b1');
btn.click();
window.temp.should.equal(1);
delete window.temp;
})

});

0 comments on commit bccdfa3

Please sign in to comment.