Giter Site home page Giter Site logo

Comments (7)

andrewwylde avatar andrewwylde commented on August 16, 2024 2

OK sounds good, let me give it some thought and see what I can do!

from metric_units_reddit_bot.

andrewwylde avatar andrewwylde commented on August 16, 2024

Hey @cannawen I'd be willing to contribute here.

Are there any criteria that would make this considered complete (i.e. acceptance criteria)

From what I can tell, you're looking for:

  • adding coverage (?)
  • reorganizing test structure

Does that sound about right?

from metric_units_reddit_bot.

cannawen avatar cannawen commented on August 16, 2024

Hey! I am having trouble mostly with the test structure because the current way is not sustainable. An example is I refactored a function name in one of the modules, but the bot-test.js tests did not fail, because I was still stubbing the old function name in bot-test.js

I think just some happy-path tests would be sufficient, but however much you feel like doing would be greatly appreciated! Thanks for taking this on, feel free to reach out if you have any more questions!

from metric_units_reddit_bot.

cannawen avatar cannawen commented on August 16, 2024

Hey @astoellis we have just added a CONTRIBUTING.md doc, please check it out when you have time! Sections "Etiquette", "Work on an issue" and "Make a PR" are most important

from metric_units_reddit_bot.

andrewwylde avatar andrewwylde commented on August 16, 2024

Hey, sorry for the massive delay. After a bit of a dive, I think it'd take some re-writing and re-wiring to get rid of the mocks. One library I've seen used (but I'm no expert in the testing realm), is Sinon.

I don't want to take up too much time, so instead maybe I can just make this recommendation and see where you think you'd like to take it.

I could take a stab at rewriting the tests w/ sinon, but my primary concern would be that it would end up a super large PR to get everything switched over without breaking in-between. Then again, maybe someone else has more experience in that department :).

from metric_units_reddit_bot.

cannawen avatar cannawen commented on August 16, 2024

No worries! :) I am happy to delete bot-test.js and start anew with Sinon.

Maybe you can just write a few tests (for example, a test to make sure the timers are enabled with the correct numbers, and another test for one network call) so we can get a gist of how Sinon would look like with our project. Don't feel like you have to write all of the tests yourself, this issue was more meant to be "choose a better framework for tests." We can create a separate issue to test each separate flow

from metric_units_reddit_bot.

cannawen avatar cannawen commented on August 16, 2024

Closing issue due to inactivity - perhaps we can open it up again in the future if anyone is interested

from metric_units_reddit_bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.