[Pkg-javascript-commits] [node-randomfill] 05/47: add test for errors

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:52:51 UTC 2017


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

rouca pushed a commit to branch master
in repository node-randomfill.

commit d8e3ddfe37ffb6766ff1a195c9a01f9fcdc2c360
Author: Calvin Metcalf <cmetcalf at appgeo.com>
Date:   Mon Jan 19 16:31:10 2015 -0500

    add test for errors
---
 test.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test.js b/test.js
index 9b44a3b..b893e9a 100644
--- a/test.js
+++ b/test.js
@@ -18,4 +18,10 @@ test('async', function (t) {
     randomBytes(300, function (err, resp) {
       t.equals(resp.length, 300, 'len: ' + 300);
     });
-});
\ No newline at end of file
+});
+if (process.browser) {
+  test('requesting to much throws', function (t) {
+    t.plan(1);
+    t.throws(randomBytes.bind(null, 65537));
+  });
+}
\ No newline at end of file

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



More information about the Pkg-javascript-commits mailing list