2013-07-17 08:28:14 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2013-07-17 10:51:16 +00:00
|
|
|
<link href="../node_modules/mocha/mocha.css" rel="stylesheet">
|
2013-07-17 08:28:14 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="mocha"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
(function() {
|
2013-07-31 02:55:47 +00:00
|
|
|
// Show DevTools.
|
|
|
|
document.oncontextmenu = function(e) {
|
|
|
|
require('remote').getCurrentWindow().inspectElement(e.clientX, e.clientY);
|
|
|
|
}
|
|
|
|
|
2013-07-17 08:28:14 +00:00
|
|
|
require('coffee-script'); // Supports .coffee tests.
|
|
|
|
|
|
|
|
var Mocha = require('mocha');
|
|
|
|
|
|
|
|
var mocha = new Mocha();
|
|
|
|
mocha.ui('bdd').reporter('html');
|
|
|
|
|
|
|
|
var query = Mocha.utils.parseQuery(window.location.search || '');
|
|
|
|
if (query.grep) mocha.grep(query.grep);
|
|
|
|
if (query.invert) mocha.invert();
|
|
|
|
|
|
|
|
// Read all test files.
|
2013-07-22 08:41:52 +00:00
|
|
|
var walker = require('walkdir').walk(__dirname);
|
2013-07-17 08:28:14 +00:00
|
|
|
|
2013-07-22 08:41:52 +00:00
|
|
|
walker.on('file', function(file) {
|
2013-07-17 08:28:14 +00:00
|
|
|
if (/.coffee$/.test(file))
|
|
|
|
mocha.addFile(file);
|
|
|
|
});
|
|
|
|
|
2013-07-22 08:41:52 +00:00
|
|
|
walker.on('end', function() {
|
2013-07-17 08:28:14 +00:00
|
|
|
mocha.run(function() {
|
|
|
|
Mocha.utils.highlightTags('code');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|