siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
25 lines (20 loc) • 595 B
JavaScript
StartTest(function (outerTest) {
outerTest.testJQuery(function (t) {
document.body.innerHTML += '<form id="fo2" method="post"><input id="txt7" type="text"></form>';
var called;
$('#fo2').bind('submit', function () {
called = true;
return false;
});
t.chain(
{
action : 'type',
target : '#txt7',
text : 'Woo[ENTER]'
},
function () {
t.ok(called, 'Form submit detected ok with jQuery');
}
)
});
});