Closed ForbesLindesay closed 12 years ago
personally no, because if you're writing say an HTTP lib you would explicitly want CRLF, or SMTP etc
it's more an issue of Mocha (and friends) displaying the difference poorly haha, especially mocha's diffs right now
OK, failing that, you could add an ignore line endings option? It is often the case (say when rendering templates etc.)
meh I dont think it's a concern for should, I've done things like foo.should.equal(bar.trim())
of course, but it's easy to do those sorts of things without modifying should in strange opinionated ways
Fair enuf
Would you consider making the default behaviour of
equals
be to ignore the difference between\r
and\r\n
in strings except where an explicit option to include-r is added. My feeling is that it's only ever really worthwhile checking for that difference when unit testing a library intended to swap\r\n
for\n
or visa versa. It breaks the unit tests of loads and loads of libraries when you run them on windows but pretty much never causes a problem with the actual code.