Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
QUnit example without jQuery
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<link rel="stylesheet" href="" type="text/css" media="screen" />
<script type="text/javascript" src=""></script>
test("a basic test example", function() {
ok( true, "this test is fine" );
var value = "hello";
equals( "hello", value, "We expect value to be hello" );
module("Module A");
test("first test within module", function() {
ok( true, "all pass" );
test("second test within module", function() {
ok( true, "all pass" );
module("Module B");
test("some other test", function() {
equals( true, false, "failing test" );
equals( true, true, "passing test" );
<h1 id="qunit-header">QUnit example</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment