Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EASY] Add singular form error selectors #808

Closed
ealush opened this issue Mar 6, 2022 · 6 comments
Closed

[EASY] Add singular form error selectors #808

ealush opened this issue Mar 6, 2022 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@ealush
Copy link
Owner

ealush commented Mar 6, 2022

Add singular form of the following:

getErrors() -> getError()
getWarnings() -> getWarning()

The idea is to return the first error/warning of a field, instead of an array.
Unlike getErrors/getWarnings that can either take 0 or 1 arguments, getError/getWarning must receive a field name.

Function signature:

function getError(fieldName: string): string;
function getWarning(fieldName: string): string;

General guidelines:

Add the functions here:
https://github.com/ealush/vest/blob/latest/packages/vest/src/core/suite/produce/produceSuiteResult.ts#L25-L27

Add to the API reference here:
https://github.com/ealush/vest/blob/latest/website/docs/api_reference.md

Add full documentation here:
https://github.com/ealush/vest/blob/latest/website/docs/writing_your_suite/result_object.md

Also, don't forget about tests.

@ealush ealush added the good first issue Good for newcomers label Mar 6, 2022
@shani-arnon
Copy link
Contributor

Hi 👋🏼
I'd like to take this task

@ealush ealush assigned ealush and shani-arnon and unassigned ealush Mar 7, 2022
@jhowlett-scottlogic
Copy link

@shani-arnon are you still working on this?

@shani-arnon shani-arnon mentioned this issue Aug 14, 2022
@shani-arnon
Copy link
Contributor

@jhowlett-scottlogic 👋🏼
Yes, sorry for the late response

@jhowlett-scottlogic
Copy link

@shani-arnon Sorry but i do not have the time to work on it now. I had a period of free time but i am now busy again with other commitments

@quinnah
Copy link

quinnah commented Nov 18, 2022

Hi! Could I work on this?

@ealush
Copy link
Owner Author

ealush commented May 11, 2023

Added in V5

@ealush ealush closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants