p5.accessibility icon indicating copy to clipboard operation
p5.accessibility copied to clipboard

Unit Testing

Open spiray opened this issue 7 years ago • 5 comments

Hello, I think it will be very beneficial for this library to have unit tests which will automatically run on build and possibly use CI. What is the approach on this?

spiray avatar Apr 25 '18 17:04 spiray

@MathuraMG @lm-n I wanted to get started with testing/CI as i think it will help a lot with making the contribution process smoother.

  • We will have tests
  • The CI can test each PR and then build.

Here are my questions -

  1. Do you have any preferences on Jest Vs. Mocha?
  2. Do you have any preference on a CI platform (CircleCI, TravisCI, or Other)? If one is chosen can one of you create an account that can be used?
  3. Is there a specific part of the project that should have tests written for it first?

Please let me know what you think. I will create a separate issue for CI.

Thanks!

spiray avatar Jun 08 '18 16:06 spiray

@spiray - Sorry for the delay! Last week was a bit of a mess.

  1. So I don't have a ton of perspective on this. I do know that Jest os probably the more popular choice. Do you have a specific preference to one over the other?
  2. Same as the above, really. Let's maybe stick to what os being used in the other p5 projects? Its circle CI right?
  3. Let's get started with the interceptors first?

@lm-n thoughts?

MathuraMG avatar Jun 16 '18 19:06 MathuraMG

hey @spiray - just wanted to follow up on this. Do the above comments make sense to start with the tests?

MathuraMG avatar Jul 05 '18 13:07 MathuraMG

Yes! I am actually working on it right now. I am just setting up the environment based off of the way it is setup in the p5.js Sound library. Ill keep you updated.

spiray avatar Jul 05 '18 13:07 spiray

Cool. I'll look at the PR soon. Just FYI https://github.com/processing/p5.js-web-editor uses Travis CI

lm-n avatar Jul 05 '18 23:07 lm-n