Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Failed assertions no longer repeat message.

Failed assertions no longer repeat the assertion message as a comment. In my
Node.js `assert` module function wrappers, I was printing the assertion message
passed into the assertion function as the assertion message. To be thorough, I
printed the assertion message of the caught `AssertionError` as a comment.
However, the `AssertionError` message is, of course, the same as the message
passed into the assertion, the assertion message. It was redundant. It is no
more.

Updated `vendor/twinkie` to support upstream changes made for CoffeeScript
1.3.1.
  • Loading branch information...
commit 0c3706035bb840bf0948d76d74fe2cc812016515 1 parent 7f808a0
@bigeasy authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 src/lib/proof.coffee
  2. +1 −1  vendor/twinkie
View
4 src/lib/proof.coffee
@@ -196,7 +196,9 @@ for name, assertion of require("assert")
assertion.apply @, splat
process.stdout.write "ok #{++@_actual} #{message}\n"
catch e
- process.stdout.write "not ok #{++@_actual} #{message} # #{e.message}\n"
+ # Recall that the assertion message is the same as the assertion
+ # exception message.
+ process.stdout.write "not ok #{++@_actual} #{e.message}\n"
EXPECTED = if name is "ok" then true else splat[1]
inspect = { EXPECTED, GOT: splat[0] }
inspect = require("util").inspect inspect, null, Math.MAX_VALUE
2  vendor/twinkie
@@ -1 +1 @@
-Subproject commit fc67487a700a5ab36f2a76ea4eb3f2610d2b3f0a
+Subproject commit b92a74f81756418c9c37cfdcede72c925a060ef4
Please sign in to comment.
Something went wrong with that request. Please try again.