Skip to content

Commit ecc8061

Browse files
committed
Merge atan test file into trigonometry tests and get it working
1 parent f43770c commit ecc8061

File tree

2 files changed

+11
-44
lines changed

2 files changed

+11
-44
lines changed

test/unit/math/atan.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

test/unit/math/trigonometry.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ suite('Trigonometry', function() {
77
let y = 1;
88
let ratio = 0.5;
99

10-
const mockP5 = {
11-
_validateParameters: vi.fn()
12-
};
1310
const mockP5Prototype = {
1411
};
12+
const mockP5 = Object.create(mockP5Prototype, {
13+
_validateParameters: vi.fn()
14+
});
1515

1616
beforeEach(async function() {
1717
trigonometry(mockP5, mockP5Prototype);
@@ -47,7 +47,7 @@ suite('Trigonometry', function() {
4747
});
4848
};
4949

50-
suite.todo('p5.prototype.angleMode', function() {
50+
suite('p5.prototype.angleMode', function() {
5151
test('should set constant to DEGREES', function() {
5252
mockP5Prototype.angleMode(mockP5.DEGREES);
5353
assert.equal(mockP5Prototype.angleMode(), mockP5.DEGREES);
@@ -102,31 +102,31 @@ suite('Trigonometry', function() {
102102
});
103103
});
104104

105-
suite.todo('p5.prototype.asin', function() {
105+
suite('p5.prototype.asin', function() {
106106
ahandleDegreesAndRadians('asin');
107107
});
108108

109-
suite.todo('p5.prototype.atan', function() {
109+
suite('p5.prototype.atan', function() {
110110
ahandleDegreesAndRadians('atan');
111111
});
112112

113-
suite.todo('p5.prototype.acos', function() {
113+
suite('p5.prototype.acos', function() {
114114
ahandleDegreesAndRadians('acos');
115115
});
116116

117-
suite.todo('p5.prototype.sin', function() {
117+
suite('p5.prototype.sin', function() {
118118
handleDegreesAndRadians('sin');
119119
});
120120

121-
suite.todo('p5.prototype.cos', function() {
121+
suite('p5.prototype.cos', function() {
122122
handleDegreesAndRadians('cos');
123123
});
124124

125-
suite.todo('p5.prototype.tan', function() {
125+
suite('p5.prototype.tan', function() {
126126
handleDegreesAndRadians('tan');
127127
});
128128

129-
suite.todo('p5.prototype.atan2', function() {
129+
suite('p5.prototype.atan2', function() {
130130
test('should handle degrees', function() {
131131
mockP5Prototype.angleMode(mockP5.DEGREES);
132132
assert.equal(

0 commit comments

Comments
 (0)