c9-core/plugins/c9.ide.plugins/test.html

61 wiersze
1.7 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test Runner</title>
<link rel="stylesheet" href="/static/lib/mocha/mocha.css" />
<style>
HTML { overflow: auto !important }
body {
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 60px 50px;
}
</style>
<script>
/*global mocha*/
var plugin, chai;
function start(p){
if (p) plugin = p;
if (plugin && chai) {
// Pass chai and mocha to the plugin
plugin.setReferences(chai, {
describe: describe,
it: it,
before: before,
after: after,
beforeEach: beforeEach,
afterEach: afterEach,
run: function(cb){
mocha.run(cb);
}
});
}
}
</script>
</head>
<body>
<div id="mocha"></div>
<div id='jserror' width='100%' height='20px' style='font: 10px \"courier new\"; color: red; display: none;'></div>
<script src="/static/require.js" crossorigin="true"></script>
<script src="/static/lib/mocha/mocha.js" crossorigin="true"></script>
<script>
/*global mocha*/
mocha.setup('bdd');
mocha.bail(false);
mocha.ignoreLeaks(true);
window.onerror = function(msg){
var el = document.getElementById('jserror');
el.innerHTML+="<div class='jserr'>"+msg+"</div>";
};
require(["/static/lib/chai/chai.js"], function(c){
chai = c;
start();
});
//--></script>
</body>
</html>