scottcorgan / tap-out

A different tap parser
MIT License
23 stars 28 forks source link

Multiline expect/equal #21

Closed rstacruz closed 8 years ago

rstacruz commented 8 years ago

Doing this with tape:

t.deepEqual({a:1, b:2}, {a:1, b: 3})

Gets you this:

    operator: deepEqual
    expected: |-
      { a: 1, b: 2 }
    actual: |-
      { a: 1, b: 3 }
    at: Test.<anonymous> (/Users/rsc/Projects/a/b/test.js:12:5)

Which becomes |- in the failures:

tap.on('output', function (res) {
  res.fail[0].error.expected === '|-'
  res.fail[0].error.actual === '|-'
})

I'd have expected it to be more like '{a: 1, b: 2}\n'. Looks like it needs to be parsed via js-yaml or similar.

scottcorgan commented 8 years ago

Fixed in https://github.com/scottcorgan/tap-out/pull/22