konva/test/runner.html

82 lines
2.4 KiB
HTML

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>KineticJS Mocha Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
<style>
#mocha .test {
overflow: auto;
}
h2.kinetic-title {
font-family: Calibri;
font-size: 16px;
color: #555;
border-top: 2px solid #999;
padding-left: 10px;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="kinetic-container"></div>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../dist/kinetic-dev.js"></script>
<script>
mocha.ui('tdd');
var assert = chai.assert,
kineticContainer = document.getElementById('kinetic-container');
Kinetic.enableTrace = true;
function buildStage() {
var container = document.createElement('div'),
stage = new Kinetic.Stage({
container: container,
width: 578,
height: 200
});
kineticContainer.appendChild(container);
return stage;
}
beforeEach(function(){
var title = document.createElement('h2'),
test = this.currentTest;
title.innerHTML = test.parent.title + ' - ' + test.title;
title.className = 'kinetic-title';
kineticContainer.appendChild(title);
});
</script>
<!-- core -->
<script src="unit/Util-test.js"></script>
<!-- shapes -->
<script src="unit/shapes/Rect-test.js"></script>
<script src="unit/shapes/Circle-test.js"></script>
<script src="unit/shapes/Image-test.js"></script>
<script src="unit/shapes/Line-test.js"></script>
<script src="unit/shapes/Text-test.js"></script>
<script src="unit/shapes/Blob-test.js"></script>
<script src="unit/shapes/Ellipse-test.js"></script>
<script src="unit/shapes/Polygon-test.js"></script>
<script src="unit/shapes/Spline-test.js"></script>
<script src="unit/shapes/Sprite-test.js"></script>
<script src="unit/shapes/Wedge-test.js"></script>
<!-- plugins -->
<script src="unit/plugins/Label-test.js"></script>
<script src="unit/plugins/Star-test.js"></script>
<script src="unit/plugins/RegularPolygon-test.js"></script>
<script>
if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
else { mocha.run(); }
</script>
</body>
</html>