Comments (7)
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.
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.
Cool, I'll close the issue, will report if something comes up (I assume it won't).
from vest.
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.
Should be released under: [email protected]
from vest.
Looks perfect, big thanks.
from vest.
awesome. added a few more tests and merged. Let me know if there are any usability issues there.
from vest.
Related Issues (20)
- Dynamic fields HOT 6
- Vest@5 is ready! Help test it!
- Last next release does not include development builds in dist HOT 4
- Debounce HOT 9
- Omit without when HOT 5
- `skip` and `only` on the same level HOT 5
- Subscribe HOT 6
- Migration guide example code - eager -> mode HOT 1
- Problem with OmitWhen executing code when condition is true HOT 2
- Done and empty suite HOT 3
- In SvelteKit, all the asynchronous tests below do not work at all. HOT 1
- Cannot find name 'Predicate'. Did you mean 'Predicates'? HOT 5
- only.group missing HOT 4
- Stateless suite HOT 2
- isDate alway fails HOT 7
- Multiple groups using same tests function HOT 2
- Eager mode does not work in a group/omitWhen/skipWhen HOT 5
- Support for nested suites HOT 2
- isNotEmpty on a numeric field HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vest.