Permalink
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (44 sloc) 1.86 KB
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Example Mocha Test</title>
<link rel="stylesheet" href="css/mocha.css" type="text/css" charset="utf-8" />
</head>
<body>
<!-- Required for browser reporter -->
<div id="mocha"></div>
<!-- mocha -->
<script src="../../node_modules/mocha/mocha.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// This will be overridden by mocha-helper if you run with grunt
mocha.setup('bdd');
</script>
<!--
IMPORTANT
If you do not want to set the `run` option to `true` for some reason
and are not using AMD, you must include the bridge.js file
in the `phantomjs` folder after you include `mocha.js`
-->
<script src="../../phantomjs/bridge.js" type="text/javascript" charset="utf-8"></script>
<!-- Include your assertion lib of choice -->
<script src="../../node_modules/chai/chai.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// Setup chai
var expect = chai.expect;
</script>
<!-- Include anything you want to test -->
<script src="../js/wombat.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/apple.js" type="text/javascript" charset="utf-8"></script>
<!-- Spec files -->
<script src="spec/wombat.js" type="text/javascript" charset="utf-8"></script>
<script src="spec/apple.js" type="text/javascript" charset="utf-8"></script>
<script src="spec/cyclical.js" type="text/javascript" charset="utf-8"></script>
<!-- run mocha -->
<script type="text/javascript" charset="utf-8">
mocha
// .globals(['Wombat', 'Apple']) // acceptable globals
.run();
</script>
</body>
</html>