[Pkg-javascript-commits] [node-mocks-http] 172/296: fixed; WritableStream.writable should be a property, not a function

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-mocks-http.

commit 413a976eece2d96c9a1604a93d72e08eae72a6cd
Author: Johnny Estilles <johnny.estilles at agentia.asia>
Date:   Wed Apr 8 08:50:45 2015 +0800

    fixed; WritableStream.writable should be a property, not a function
---
 lib/mockWritableStream.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/mockWritableStream.js b/lib/mockWritableStream.js
index 567532b..7d82644 100644
--- a/lib/mockWritableStream.js
+++ b/lib/mockWritableStream.js
@@ -6,7 +6,14 @@
 
 function WritableStream() {}
 
-WritableStream.prototype.writable = function () {};
+Object.defineProperty(WritableStream, 'writable', {
+    configurable: true,
+    enumerable: true,
+    get: function() {
+        return true;
+    }
+});
+
 // WritableStream.prototype.write = function(string, [encoding], [fd]){}
 // WritableStream.prototype.write = function(buffer){}
 WritableStream.prototype.end = function () {};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git



More information about the Pkg-javascript-commits mailing list