-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
t.true() should be exact. #590
Comments
|
Yes, I have since read the documentation, I believe it being an alias is a mistake and should be stopped.
|
I can certainly see your argument. This behavior has been part of tape since its inception - added in 7948e2e, modeled after https://www.npmjs.com/package/tap, and is how tap continues to behave. It's not worth a breaking change just for something like this, and i think mimicking tap is a pretty important priority. Can you try making your argument there as well? |
Funny thing, I'm looking through their docs.. and I literally had to go into their code to even find that these aliases exist at all. |
Indeed, aliases don't seem documented at all, but they've survived many major versions none the less. |
I pretty much summed up this thread here. Just for the record. |
Seems reasonable to remove those aliases in the next semver-major, but I'm not sure when that will ever occur :-) |
I know you have
t.ok(true);
t.ok("moose");
and that is absolutely fine to be loose.but I was wracking my brain for ages trying to work out why tests were passing, but in real environment, things were breaking..
t.true("false")
should NOT pass..That is just crazy.
Especially when you have
t.equals()
andt.looseEquals()
So
t.equals()
is strict by default.. butt.true()
is loose by default..There just doesn't seem to be consistency in the api.
The text was updated successfully, but these errors were encountered: