With this proposal, we only need to agree on names for the assertion
module's methods. If this proposal is reasonable, please contribute
nominations for complete API's in the following form, and then we can
do run offs.
A (ok, equiv, notEquiv, equal, notEqual)
B (ok, eq, ne, is, isnt)
C (ok, eq, uneq, is, isnt)
Kris Kowal
Yes, please hold off showing your hand until all nominations are in.
In positions:
1 is the plain assertion method
2 is the deep equivalence comparison method
3 is the opposite thereof
4 is the shallow equivalence comparison (==)
5 is the opposite thereof
6 is the shallow strict equivalence comparison (===)
7 is the opposite thereof
A (ok, equiv, notEquiv, equal, notEqual)
B (ok, eq, ne, is, isnt)
C (ok, eq, uneq, is, isnt)
D (ok, deepEqual, notDeepEqual, equal, notEqual, same, notSame)
Kris Kowal
Dean, Ash, Hannes, Nathan, Kris, and I discussed this on IRC and
decided that the following was acceptable:
D (ok, equal notEqual, deepEqual, notDeepEqual)
equal/notEqual uses either == or === (to be decided)
deepEqual/notDeepEqual does a recursive comparison on the object properties.
--John
In positions:
1 is the plain assertion method
2 is the deep equivalence comparison method
3 is the opposite thereof
4 is the shallow equivalence comparison (either == or == to be decided later)
5 is the opposite thereof
A (ok, equiv, notEquiv, equal, notEqual)
B (ok, eq, ne, is, isnt)
C (ok, eq, uneq, is, isnt)
D (ok, deepEqual, notDeepEqual, equal, notEqual)
Kris Kowal
Ok.
> I would still like to get something into the proposal allowing failed
> assertions to log rather than throw an exception...
I'll write some verbiage about that. Probably something like
exports.assertions = "log"; or by default "throw".
Kris Kowal