Tests: Start getting QUnit tests to work on Node.js

Work in progress…
This commit is contained in:
Jürg Lehni 2016-01-27 19:57:07 +01:00
parent 0c1b4376d3
commit 4c84c3dad5
44 changed files with 322 additions and 176 deletions

View file

@ -10,7 +10,8 @@
* All rights reserved.
*/
module('Point');
QUnit.module('Point');
test('new Point(10, 20)', function() {
var point = new Point(10, 20);
equals(point.x, 10, 'point.x');
@ -44,8 +45,6 @@ test('new Point({ angle: 45, length: 20})', function() {
equals(point, new Point(15.32089, 12.85575));
});
module('Point vector operations');
test('normalize(length)', function() {
var point = new Point(0, 10).normalize(20);
equals(point, new Point(0, 20));