You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmessage=`${errorType} "${name}" on line ${line} is being redeclared and conflicts with a p5.js ${errorType.toLowerCase()}. JavaScript does not declaring a ${errorType.toLowerCase()} more than once. p5.js reference: ${url}.`;
196
197
returnmessage;
197
198
}
198
199
200
+
// Helper function that checks if a user definition has already been defined
201
+
// in the p5.js library, either as a constant or as a function.
//expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining('Function "setup" on line 2 is being redeclared and conflicts with a p5.js function'));
216
+
expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining('Function "rect" on line 2 is being redeclared and conflicts with a p5.js function'));
217
+
});
218
+
219
+
test('allows redefinition of whitelisted functions',function(){
0 commit comments