YUI Test is a great tool for javascript testing, but it has a couple of small issues:
b9jTest addresses the problems above by:
An example b9jTest document:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>b9jTest example</title>
<link rel="stylesheet" type="text/css"
href="http://appengine.bravo9.com/b9j/b9jTest.css">
<script type="text/javascript"
src="http://appengine.bravo9.com/b9j/b9jTest.js"></script>
</head>
<body class="yui-skin-sam">
<div id="testLogger"></div>
<script type="text/javascript">
b9jTest(function(test) {
test.areEqual("xyzzy", "xyzzy");
test.areEqual("apple", "apple");
test.areEqual("banana", "banana");
});
</script>
</body>
b9jTest()
is a global function that accepts a function that is called with a testing object. The testing object provides access to the standard YUI assertions and more.
Documentation:
http://appengine.bravo9.com/b9j/documentation/b9jTest.html
Download:
b9jTest.js
b9jTest.css