GithubHelp home page GithubHelp logo

Add unit tests about ladder99 HOT 7 OPEN

ladder99 avatar ladder99 commented on June 19, 2024
Add unit tests

from ladder99.

Comments (7)

MRIIOT avatar MRIIOT commented on June 19, 2024 1

I would be OK with meter. @tukusejssirs go for it.

from ladder99.

MRIIOT avatar MRIIOT commented on June 19, 2024

What are some examples of currently existing tests?
What are some examples of critical areas?

from ladder99.

bburns avatar bburns commented on June 19, 2024

we don't have much in the way of tests yet - just some *-test.js files that run in node that were used to help develop the code, not geared towards automation.

critical areas would be any complex/confusing code - eg the jobboss shift handling, availability shift handling, adapter cache calculation code

could start by instrumenting that code for tests. along the way help make code more functional and easier to understand.

and for future code, i haven't had much luck sticking with TDD in other projects, but could try that going forward. @tukusejssirs what about you?

from ladder99.

tukusejssirs avatar tukusejssirs commented on June 19, 2024

and for future code, i haven't had much luck sticking with TDD in other projects, but could try that going forward. @tukusejssirs what about you?

IMO having tests for all units (at the very least functions and methods) would be very nice, however, it takes some time to create robust tests. We could even track the test coverage.

While I was thinking about using TDD approach, however, I am more acustomed to be create the code first, then tests (after the code is more or less ready to merge, before merging), as the code change and while coding, I can create a list of test cases (based on the conditions in the code), which I can’t create out of the blue before the code is built.

IMO, we should try to add tests whenever when add new features or update (enhance, possible fix some bugs) the code. Or we could wait until a particular app is moved to Nx, then start adding the tests. In either case, there is no need to add all the unit tests systematically right now, as we don’t have the manpower for that right now.

from ladder99.

MRIIOT avatar MRIIOT commented on June 19, 2024

@bburns TDD requires specifications up front. It won't work without spec or design model.
@tukusejssirs Acceptance tests might be an option.

from ladder99.

bburns avatar bburns commented on June 19, 2024

IMO, we should try to add tests whenever when add new features or update (enhance, possible fix some bugs) the code. Or we could wait until a particular app is moved to Nx, then start adding the tests.

Okay - it makes sense to start adding tests for new features after we move services into Nx, since it includes Jest.

Could start with the Meter service, since we'll be adding code for OEE there.

from ladder99.

tukusejssirs avatar tukusejssirs commented on June 19, 2024

Could start with the Meter service, since we'll be adding code for OEE there.

Yeah, I was about to ask you which app (service) would be (in your opinion) the easiest to move to Nx workspace first. I was thinking about one that does not depend on ther services (so that it could be easily tested without Docker). Moving the app itself is the easiest part, we need to adjust (a bit) global Nx config and probably the project-level config too. There are so many options …

Do you think that meter is the ‘right’ service to start the move to Nx? I was thinking about creating a test branch in my fork and then I’ll you guys for comments if my choices will be okay with you. WDYT, @bburns, @MRIIOT?

from ladder99.

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.