Git Product home page Git Product logo

Comments (7)

ealush avatar ealush commented on May 26, 2024 1

Hey @vonagam, thanks for this suggestion.
Yes, this does make absolute sense, and is also not a great lift. Look like a little change to https://github.com/ealush/vest/blob/latest/packages/vest/src/suiteResult/selectors/produceSuiteSummary.ts#L22

The thing is that test summary is on the field level, if we have multiple fields, we have to clearly indicate it could be partial (like, some tests are pending and some are done).

We could be VERY explicit, and say:

pending: number (pending: 2)

But we could also be a little more relaxed and say something like:
hasPending: boolean

Support would probably only come on v5, but that's pretty obvious.

One thing that I'll say is - I am planning to add a few more async capabilities to Vest, and we need to make sure whatever we land on will play nicely with that too. These new async features will be outside of a single test, but an actual portion of the suite in order to allow server-validation to communicate with client-validation. I'll have to iterate on it.

from vest.

ealush avatar ealush commented on May 26, 2024 1

Ran a quick first iteration based on this thread. Might need a second pass, but let me know if this is somewhat helpful: #1067

from vest.

vonagam avatar vonagam commented on May 26, 2024 1

Cool, I'll close the issue, will report if something comes up (I assume it won't).

from vest.

vonagam avatar vonagam commented on May 26, 2024

For naming, I think it should be pendingCount if it is a number to match errorCount, warnCount and testCount, or pending if it is a boolean to match valid.

If it is a number to make it consistent it have to be a sum of pendingCount from all fields (so number would mean "number of pending tests" and not "number of pending fields", though if async tests for a field are eager and sequential it is the same thing).

if we have multiple fields, we have to clearly indicate it could be partial (like, some tests are pending and some are done).

Ye, that's the same with current counters or valid. If you want to know overall state look at the top level, if you want for a specific field check tests[fieldName].

from vest.

ealush avatar ealush commented on May 26, 2024

Should be released under: [email protected]

from vest.

vonagam avatar vonagam commented on May 26, 2024

Looks perfect, big thanks.

from vest.

ealush avatar ealush commented on May 26, 2024

awesome. added a few more tests and merged. Let me know if there are any usability issues there.

from vest.

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.