2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-16 17:45:09 +00:00
iconify/tests.html

70 lines
1.9 KiB
HTML
Raw Normal View History

2017-02-22 15:25:57 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<!--
Tests for browser.
Open this file in browser via web server.
Tun run tests in node run "node test".
Before opening this file you need to compile tests.
To compile tests run "node build/tests".
Important: this file should be ran from web server, not file://
-->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=1024px">
<!--[if IE]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20150312/classList.min.js"></script>
<![endif]-->
<title>Tests</title>
<link href="./node_modules/mocha/mocha.css" rel="stylesheet" />
<style>
#debug, #debug2 { display: none }
#log {
font: 11px / 15px sans-serif;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="debug"></div>
<div id="debug2"></div>
<div id="log"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>
<script src="./node_modules/mocha/mocha.js"></script>
<script src="./node_modules/chai/chai.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./debug/tests.js"></script>
<script>
$(document).ready(function() {
mocha.checkLeaks();
mocha.setup({
globals: ['SSVGLoaderTest1', 'SSVGRenderTest', 'SSVGRenderTest2']
});
mocha.run();
});
console.log = function() {
var html = '';
for (var i = 0; i < arguments.length; i ++) {
switch (typeof arguments[i]) {
case 'string':
case 'number':
case 'function':
html += ' ' + arguments[i];
break;
default:
html += ' ' + JSON.stringify(arguments[i]);
}
}
$('#log').append($('<p />').text(html));
};
</script>
</body>
</html>