28 lines
673 B
Diff
28 lines
673 B
Diff
From a17b21199149014a26729e79331001f976c9ee81 Mon Sep 17 00:00:00 2001
|
|
From: Gavin Huang <gravof@gmail.com>
|
|
Date: Tue, 25 Sep 2012 12:33:55 +0800
|
|
Subject: [PATCH 05/13] Pass .fail() unit test
|
|
|
|
---
|
|
expect.js | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/expect.js b/expect.js
|
|
index ab5a1ee..ac14ea8 100644
|
|
--- a/expect.js
|
|
+++ b/expect.js
|
|
@@ -466,8 +466,8 @@
|
|
* @api public
|
|
*/
|
|
Assertion.prototype.fail = function (msg) {
|
|
- msg = msg || "explicit failure";
|
|
- this.assert(false, msg, msg);
|
|
+ var error = function() { return msg || "explicit failure"; }
|
|
+ this.assert(false, error, error);
|
|
return this;
|
|
};
|
|
|
|
--
|
|
1.8.2.1
|
|
|