Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created November 21, 2011 16:50
Show Gist options
  • Save Raynos/1383202 to your computer and use it in GitHub Desktop.
Save Raynos/1383202 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>DOM-shim unit tests</title>
<link rel="stylesheet" href="resources/nodeunit.css" type="text/css" />
<script src="resources/es5-shim.js"></script>
<script src="resources/nodeunit.js"></script>
<script src="../code/my/file"></script>
</head>
<body>
<h1 id="nodeunit-header">DOM-shim unit tests</h1>
<script>
nodeunit.run({
"test my file": function (test) {
test.ok(window.myFile, "exposes global");
}
});
require("someOtherFiles.js", function (module) {
nodeunit.run({
"module": function (test) {
test.ok(module);
}
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment