Have you really added an element in the DOM to the instrument? Also you are missing a); on the device to close the click callback.
This worked for me:
describe("export citations", function () {
var btn;
beforeEach(function() {
btn= $("input#myButton").eq(0);
});
it("should call click function", function() {
btn.click();
expect($("#content").length).toBeGreaterThan(0);
});
});
fittings
(function() {
$("body").html("<input id='myButton' type='button'>");
$("body").html("<div id='content'></div>");
$("input#myButton").click(function() {
$("#content").html("<p>Hello</p>");
});
})();
source
share