describe("kutty Direct Swap", function () { beforeEach(function () { this.server = makeServer(); clearWorkArea(); }); afterEach(function () { this.server.restore(); clearWorkArea(); }); it('handles basic response properly', function () { this.server.respondWith("GET", "/test", "Clicked
Swapped
"); var div = make('
click me
'); make('
'); div.click(); this.server.respond(); div.innerHTML.should.equal("Clicked"); byId("d1").innerHTML.should.equal("Swapped"); }) it('handles no id match properly', function () { this.server.respondWith("GET", "/test", "Clicked
Swapped
"); var div = make('
click me
'); div.click(); this.server.respond(); div.innerText.should.equal("Clicked"); }) });