Skip to content

Instantly share code, notes, and snippets.

@laser
Created January 10, 2012 16:38
Show Gist options
  • Save laser/1589926 to your computer and use it in GitHub Desktop.
Save laser/1589926 to your computer and use it in GitHub Desktop.
test runner
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script type="text/javascript" src="../../shared/js/yui/build_2_9_0/yuiloader/yuiloader-min.js"></script>
<script type="text/javascript">
window.onload = function() {
var loader;
loader = new YAHOO.util.YUILoader({
base: "",
require: ["dom","event","logger","yuitest"],
loadOptional: false,
combine: true,
filter: "MIN",
allowRollup: true,
onSuccess: function() {
campaignMVC_LoadDeps(function(){
var logger,
cmsTestSuite,
testCaseA;
logger = new YAHOO.tool.TestLogger("root");
cmsTestSuite = new YAHOO.tool.TestSuite("CMS V2 Test Suite");
testCaseA = new CampaignOverviewViewGoldenPath();
cmsTestSuite.add(testCaseA);
YAHOO.tool.TestRunner.add(cmsTestSuite);
YAHOO.tool.TestRunner.run();
}, "../../shared/", "../../shared/");
}
});
loader.addModule({
fullpath: "mocks.js",
name: "mocks",
type: "js"
});
loader.require("mocks");
loader.addModule({
fullpath: "tc_campaignMVC.js",
name: "tc_campaignMVC",
type: "js"
});
loader.require("tc_campaignMVC");
loader.addModule({
fullpath: "../../shared/js/components/resourceBundlerUtil.js",
name: "resourceBundlerUtil",
type: "js"
});
loader.require("resourceBundlerUtil");
///////////////////////////////////////////////
// LIB UNDER TEST
loader.addModule({
fullpath: "../../shared/js/campaigns/campaignMVC.js",
name: "campaignMVC",
type: "js"
});
loader.require("campaignMVC");
loader.insert();
};
</script>
</head>
<body class="yui-skin-sam">
<div id="root" style="width: 80em;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment