Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
outofambit committed Apr 4, 2023
commit d39b9616405b4717c9cceeb65b2727df5b826963
10 changes: 5 additions & 5 deletions test/unit/core/vertex.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
suite('Vertex', function() {
var myp5;
let _friendlyErrorSpy;
let _friendlyLocalizedErrorSpy;
setup(function(done) {
_friendlyErrorSpy = sinon.spy(p5, '_friendlyError');
_friendlyLocalizedErrorSpy = sinon.spy(p5, '_friendlyLocalizedError');
new p5(function(p) {
p.setup = function() {
myp5 = p;
Expand All @@ -12,7 +12,7 @@ suite('Vertex', function() {
});

teardown(function() {
_friendlyErrorSpy.restore();
_friendlyLocalizedErrorSpy.restore();
myp5.remove();
});

Expand Down Expand Up @@ -59,7 +59,7 @@ suite('Vertex', function() {
});
test('_friendlyError is called. vertex() should be used once before quadraticVertex()', function() {
myp5.quadraticVertex(80, 20, 50, 50, 10, 20);
assert(_friendlyErrorSpy.calledOnce, 'p5._friendlyError was not called');
assert(_friendlyLocalizedErrorSpy.calledOnce, 'p5._friendlyError was not called');
});
});

Expand All @@ -80,7 +80,7 @@ suite('Vertex', function() {
});
test('_friendlyError is called. vertex() should be used once before bezierVertex()', function() {
myp5.bezierVertex(25, 30, 25, -30, -25, 30);
assert(_friendlyErrorSpy.calledOnce, 'p5._friendlyError was not called');
assert(_friendlyLocalizedErrorSpy.calledOnce, 'p5._friendlyError was not called');
});
});

Expand Down