-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
[WIP] Verify types on within and related assertions #692
Conversation
@vieiralucas this is some good stuff. Thanks for working on this! :D Documentation is generated from the function comments. Elsewhere in the documentation, the convention used for this type of situation is: "asserts that the string target is...". So we'll want to do something similar in the comments for the functions modified in the PR. My suspicion is that we'll want your PR to include all the changes (including the atLeast and atMost parts that haven't been merged from master yet), even though we won't be able to merge it until master is merged with 4.x.x. But I could be wrong so let's wait for @keithamus to offer guidance. Also, just to put this on everyone's radar: there's currently no |
@@ -504,14 +504,15 @@ module.exports = function (chai, _) { | |||
/** | |||
* ### .above(value) | |||
* | |||
* Asserts that the target is greater than `value`. | |||
* Asserts that the number target is greater than `value`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just being nitpicky, but this should be:
Asserts that the target number is greater than
value
Thanks for the PR @vieiralucas, great to see you here! This is looking really good, especially when it comes to the tests, you did a great work covering your changes! I just think we may change some of the texts to make them clearer. @meeber Maybe we could create an issue for that, adding I think it won't hurt to include the changes on master here ( |
@lucasfcosta The only issue is that the existing documentation says stuff like "string target" and "function target" all over the place, so while I also prefer "target number" over "number target", it does break the established style. Although we could just change all the existing ones :D Kinda the same thing with the argument error message phrasing. He just used the phrasing style that already exists from the Other alternatives: |
I would definitely go with the missile one |
So, should I try to merge the missing features and implement the type check? |
I think it's probably time to merge |
@keithamus That sounds good. We'll need to get the check-error module added as well. Also it'd be good to have the assertion-error module released as a new version and updated here; it contains an important bug fix. Do you want @vieiralucas to update this PR with the fixes that are currently master-only (related to the @vieiralucas Please hold off on the |
@keithamus I think it would be great! Many people have asked for features on the @meeber Do you think we should create an issue for that? Maybe it would be good, just to keep this on our sight so we won't forget. Let me know if you guys need any help for this merge, I think it will be a pretty big one. |
@lucasfcosta Definitely. I've been wanting to sit down and go through and identify all the assertions that are missing from the |
Let's get whats on this PR merged into |
I couldn't be happier 😄 |
@keithamus I just want to make sure we're on the same page here. There are two separate issues:
|
@meeber yup all on the same page. Here's my 2¢:
|
@keithamus Sounds good! :D |
@@ -553,14 +566,15 @@ module.exports = function (chai, _) { | |||
/** | |||
* ### .least(value) | |||
* | |||
* Asserts that the target is greater than or equal to `value`. | |||
* Asserts that the number target is greater than or equal to `value`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"target number" here would be better than "number target"
@vieiralucas apart from the tiny grammatical errors which would be great to see fixed, I'm happy with this PR and would be happy to merge when those errors are fixed 👍 |
@keithamus Alright, but have you seen that existing documentation is like "string target" and "function target"?. I wanted to maintain consistency. It's up to you guys, I can, with no problem, fix that. |
@vieiralucas hmm, I didn't catch that. Lets keep it consistent for now then, and we can take a look at documentation later down the line. In which case this LGTM, @meeber or @lucasfcosta feel free to merge if it LGTY 😉 |
LGTM! |
Hello there, this will be my proposal solution for #691
So why this is a WIP...
I started coding this from the branch master.
When I came here to make the PR, I realized that the 4.x.x branch was 166 commits behind master and that my PR could not be merged.
Well, no problem. I checkout to 4.x.x and made some cherry-picks (actually ctrl-c ctrl-v 😄)
BUT, I saw that some features that exists on master did not exist here on 4.x.x
The features which are missing on 4.x.x that affect this PR:
assert.atLeast
assert.atMost
increase|decrease...by()
What should I do about it?
Things that I'm not sure how to do