flatiron / plates

Light-weight, logic-less, DSL-free, templates for all javascript environments!
MIT License
831 stars 69 forks source link

Trim all whitespace from tests #40

Closed nhunzaker closed 12 years ago

nhunzaker commented 12 years ago

Just a small request. Vows in the terminal is an absolute pain to troubleshoot when there's a ton of whitespace/newline characters in the output. Would it be too much trouble in the future to strip all all whitespace from these elements?

jfhbrook commented 12 years ago

Which output is this? Are you referring to assertion errors for html comparisons?

nhunzaker commented 12 years ago

Mhmm

jfhbrook commented 12 years ago

I see your point, definitely. To play devil's advocate, though: those whitespace and newline characters matter for the purposes of string equality assertions. That is, if the results have 3 newlines but the expectation only has 2, and we strip those out before printing to the user, then you'd really be feeling the troubleshooting pain.

pksunkara commented 12 years ago

@nhunzaker There are there more for checking if the tests pass even with spaces and newlines :)

And also they serve as examples. :D

nhunzaker commented 12 years ago

That's fair. Certainly a difficulty for my uses, but I'll manage :).

pksunkara commented 12 years ago

@nhunzaker You can change the whitespace in tests but at maximum limited to remove a single space/newline or something like that.