2015-02-11 07:53:10 -08:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Mocha Test Runner</title>
|
|
|
|
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
|
|
|
|
<link rel="stylesheet" href="../css/material.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="mocha"></div>
|
2015-03-18 05:53:26 -07:00
|
|
|
<script src="../node_modules/jquery/dist/jquery.js"></script>
|
2015-02-11 07:53:10 -08:00
|
|
|
<script src="../node_modules/mocha/mocha.js"></script>
|
|
|
|
<script src="../node_modules/chai/chai.js"></script>
|
2015-03-18 05:53:26 -07:00
|
|
|
<script src="../node_modules/chai-jquery/chai-jquery.js"></script>
|
2015-03-16 09:58:34 -07:00
|
|
|
<!-- <script src="../js/material.js"></script> -->
|
|
|
|
<!-- The following components rely on the requestAnimFrame shim (incomplete list): -->
|
|
|
|
<!-- menu -->
|
|
|
|
<script src="../src/third_party/rAF.js"></script>
|
|
|
|
<script>
|
|
|
|
// Only necessary for PhantomJS 1.x
|
|
|
|
Function.prototype.bind = Function.prototype.bind || function(to){
|
|
|
|
// Make an array of our arguments, starting from second argument
|
2015-03-17 05:10:34 -07:00
|
|
|
var partial = Array.prototype.splice.call(arguments, 1),
|
2015-03-16 09:58:34 -07:00
|
|
|
// We'll need the original function.
|
2015-03-17 05:10:34 -07:00
|
|
|
fn = this;
|
2015-03-16 09:58:34 -07:00
|
|
|
var bound = function (){
|
|
|
|
// Join the already applied arguments to the now called ones (after converting to an array again).
|
|
|
|
var args = partial.concat(Array.prototype.splice.call(arguments, 0));
|
|
|
|
// If not being called as a constructor
|
|
|
|
if (!(this instanceof bound)){
|
|
|
|
// return the result of the function called bound to target and partially applied.
|
|
|
|
return fn.apply(to, args);
|
|
|
|
}
|
|
|
|
// If being called as a constructor, apply the function bound to self.
|
|
|
|
fn.apply(this, args);
|
|
|
|
}
|
|
|
|
// Attach the prototype of the function to our newly created function.
|
|
|
|
bound.prototype = fn.prototype;
|
|
|
|
return bound;
|
|
|
|
};
|
|
|
|
</script>
|
2015-02-11 07:53:10 -08:00
|
|
|
<script src="../src/wskComponentHandler.js"></script>
|
|
|
|
<script src="../src/button/button.js"></script>
|
2015-03-17 07:32:39 -07:00
|
|
|
<script src="../src/checkbox/checkbox.js"></script>
|
2015-03-17 07:39:07 -07:00
|
|
|
<script src="../src/column-layout/column-layout.js"></script>
|
2015-03-17 07:36:06 -07:00
|
|
|
<script src="../src/radio/radio.js"></script>
|
2015-02-11 07:53:10 -08:00
|
|
|
<script src="../src/spinner/spinner.js"></script>
|
2015-03-16 09:58:34 -07:00
|
|
|
<script src="../src/menu/menu.js"></script>
|
2015-02-11 07:53:10 -08:00
|
|
|
<script>
|
|
|
|
// mocha.ui('bdd');
|
|
|
|
mocha.setup('bdd');
|
|
|
|
mocha.reporter('html');
|
|
|
|
// use chais-implementation of "expect"
|
|
|
|
expect = chai.expect;
|
|
|
|
</script>
|
|
|
|
<!-- Specifications -->
|
|
|
|
<!--<script src="test.spec.js"></script>-->
|
|
|
|
<script src="unit/button.js"></script>
|
2015-03-17 07:32:39 -07:00
|
|
|
<script src="unit/checkbox.js"></script>
|
2015-03-17 07:39:07 -07:00
|
|
|
<script src="unit/column-layout.js"></script>
|
2015-03-17 07:36:06 -07:00
|
|
|
<script src="unit/radio.js"></script>
|
2015-02-11 07:53:10 -08:00
|
|
|
<script src="unit/spinner.js"></script>
|
2015-03-16 09:58:34 -07:00
|
|
|
<script src="unit/menu.js"></script>
|
2015-02-11 07:53:10 -08:00
|
|
|
|
|
|
|
<script>
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
if (window.mochaPhantomJS) {
|
|
|
|
mochaPhantomJS.run();
|
|
|
|
} else {
|
|
|
|
mocha.run();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|