Permalink
Browse files

Alias Test#cb - Test#called

  • Loading branch information...
1 parent 3b36df5 commit 0bfd682366befb15ae8209b4ddcee6692a9804ac @5long committed Dec 10, 2010
Showing with 5 additions and 2 deletions.
  1. +2 −0 src/test.js
  2. +3 −2 test/fixture/sample_test.js
View
@@ -125,6 +125,8 @@ util.def(Test.prototype, {
}
})
+Test.prototype.called = Test.prototype.cb
+
function prepareError(expected, actual, msg, operator, stackTop) {
return new AssertionError({
message: msg
@@ -21,6 +21,7 @@ var t = new Test("a simple one", function(test) {
test.in(0, ["yep"])
test.is(42, "42", "fail")
test.isnt(0/0, NaN)
+ test.equal(test.called, test.cb, "an alias")
test.empty("")
test.empty([])
test.empty({})
@@ -31,8 +32,8 @@ module.exports = {
, testDesc: "a simple one"
, msg: msg
, num: {
- all: 13
- , passed: 9
+ all: 14
+ , passed: 10
, failed: 4
}
}

0 comments on commit 0bfd682

Please sign in to comment.