habitjs
Version:
Modules and Dependency Injection for the browser and Node
68 lines (62 loc) • 2.2 kB
HTML
<html>
<head>
<title>Fixjs Tests</title>
<link rel="stylesheet" type="text/css" href="css/tests.css">
</head>
<body>
<div id="mocha"></div>
<script type="text/javascript">
//Polyfill for function.prototype.bind because wtf phantomjs?!?
(function () {
'use strict';
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) { //jshint ignore: line
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP(); //jshint ignore: line
return fBound;
};
}
})();
</script>
<script type="text/javascript">
//Some configuration data to test Fixjs configuration
var Habit = {
config: {
'my/configured/module': {
message: 'Hello from the global namespace'
}
}
};
</script>
<script type="text/javascript" src="js/vendor.min.js"></script>
<script type="text/javascript" src="js/habit.min.js"></script>
<script>
mocha.setup('bdd');
window.expect = chai.expect;
</script>
<script type="text/javascript" src="js/tests.min.js"></script>
<!-- <script type="text/javascript" src="js/blanket.min.js" data-cover-only="*"></script> -->
<!-- <script type="text/javascript" src="js/mocha-blanket.js"></script> -->
<script>
mocha.globals(['_GOOG_TRANS_EXT_VER']);
mocha.checkLeaks();
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.run();
}
</script>
</body>
</html>