-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Various work on aliases #489
Conversation
I can also add tests for theses aliases, to make sure they run OK. Let me know if you want that. |
If you would kindly add tests, then I'll happily merge 😄 |
…ther isSomething assertions
…ation and code consistent with other is* assertions
@keithamus here you go with the tests... I also took some liberties as you can see, making this PR broader but still focused on aliases for the Let me know if you need anything else on this! |
Note that since there are a lot of changes, I made sure individual commits were self-contained so that you can go through each of them instead of having to digest the resulting blob in one go! |
LGTM 👍 |
Thanks @keithamus!! |
Here is what this PR does:
is*
aliases forextensible
,notExtensible
,sealed
,notSealed
,frozen
,notFrozen
and update their respective tests to test the aliasesis*
aliases forok
andnotOk
and update their respective tests to test the aliasesthrows
consistent: before these changes, the name of the assertion in the documentation wasthrows
, the examples were usingthrow
and the code was usingThrow
. Now it'sthrows
everywhere and the rest is aliasesthrows
(throw
andThrow
)isTrue
,isNull
,isObject
,isBoolean
, ... (20 in total), I made theis*
aliases the authoritative source, and kept the original ones as aliases for backward-compatibility. For example,isOk
should be the "official" version (likeisTrue
), butok
still exists. If I am not committing any typo, nothing in the API will be broken, just the way it's presented is more consistent.This PR doesn't update the main
chai.js
file.