power-assert-js / power-assert-formatter

Power Assert output formatter
MIT License
6 stars 3 forks source link

String diff (or expected/actual) reporting on BinaryExpression #4

Closed twada closed 10 years ago

twada commented 10 years ago

Provide string diff reporting on BinaryExpression such as:

assert(foo === bar)
       |   |   |
       |   |   "abcdff"
       |   false
       "abcdef"

--- [string] bar
+++ [string] foo
@@ -1,6 +1,6 @@
 abcd
-f
+e
 f

Other types:

assert(this.ary.indexOf(who) === two)
            |   |       |    |   |
            |   |       |    |   2
            |   |       |    false
            |   -1      "ariya"
            [1,2,3]

$$$ [number] two
### [number] this.ary.indexOf(who)
$ 2
# -1

Starting with jsondiffpatch but now decided to use google-diff-match-patch directly.

TODO