busterjs/buster — Issue #103: Yoda mode for assert.equals
Author: ebi
Created: 2012-02-23 13:24:09+00:00
State: open

A lot of the other testing systems I use do assert.equals(expected, actual) which I think is better because to me this seems much more readable:

assert.equals(50, math.sum(40, 10));
assert.equals(5, math.sum(4, 1));
assert.equals(50000, math.sum(40000, 10000));

Than this:

assert.equals(math.sum(40, 10), 50);
assert.equals(math.sum(4, 1), 5);
assert.equals(math.sum(40000, 10000), 50000);

I suggest we could make this configurable so the users can decide which way they prefer.