funcunit
Version:
<!-- @hide title
38 lines (32 loc) • 810 B
HTML
<html>
<body>
<script src="../node_modules/steal/steal.js">
var $ = require("funcunit/browser/jquery");
$(function(){
window.confirm = function(string) {
return true;
};
window.alert = function(string) {
return true;
};
$('#confirm').click(function() {
if(confirm("are you sure?")) {
$("#confirm").html("I was confirmed");
} else {
$("#confirm").html("I was not confirmed");
}
});
$('#alert').click(function() {
if(alert("That just happened")) {
$("#alert").html("I was alert");
} else {
$("#alert").html("I was alert");
}
});
});
</script>
<a href="#" id="confirm">Confirm!</a>
<a href="#" id="alert">Alert!</a>
</body>
</html>