tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

How to create a line break in my test message? #535

Closed cagross closed 3 years ago

cagross commented 3 years ago

Hello. How would I approach adding a line break in one of my Tape test messages? I've tried adding a \n, as typically works for console.log() output, but that doesn't seem to do the trick.

ljharb commented 3 years ago

You can't - line breaks would violate the TAP spec, and break every TAP formatter and consumer.

You can do multiple t.comment()s, but each line has to start with a #.

cagross commented 3 years ago

OK thanks for that info. I'll look into t.comment()--sounds like it could what I need.