mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Implement HtmlCanvas; move some tests to commonTest
This commit is contained in:
BIN
web/test/FontAwesome.ttf
Normal file
BIN
web/test/FontAwesome.ttf
Normal file
Binary file not shown.
21
web/test/canvas.html
Normal file
21
web/test/canvas.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Canvas Test</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "FontAwesome";
|
||||
src: url(FontAwesome.ttf) format("truetype");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="../build/bundles/test.js"></script>
|
||||
<canvas id="canvas" width=500 height=400></canvas>
|
||||
<script>
|
||||
const canvas = document.getElementById('canvas');
|
||||
const test = new document.coreTest.org.isoron.platform.gui.HtmlCanvasTest(canvas);
|
||||
test.testDrawing();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
15
web/test/index.html
Normal file
15
web/test/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mocha Tests</title>
|
||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/chai/chai.js"></script>
|
||||
<script>mocha.setup('bdd')</script>
|
||||
<script src="../build/bundles/test.js"></script>
|
||||
<script>mocha.run();</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,2 +1,3 @@
|
||||
var assert = require('assert');
|
||||
var coreTest = require('core_test');
|
||||
document.coreTest = coreTest
|
||||
|
||||
Reference in New Issue
Block a user