Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: test-tls-cipher-list test error type
test that the type of error thrown is correct
  • Loading branch information
jasnell authored and Julien Gilli committed Jul 16, 2015
commit ead952d27879c0bdd5a2956f25cf707119c22652
8 changes: 4 additions & 4 deletions test/simple/test-tls-cipher-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ doTest(V1038Ciphers, 'v0.10.38', 8);
});

// invalid value
assert.throws(function() {tls.getLegacyCiphers('foo');});
assert.throws(function() {tls.getLegacyCiphers('foo');}, Error);
// no parameters
assert.throws(function() {tls.getLegacyCiphers();});
assert.throws(function() {tls.getLegacyCiphers();}, TypeError);
// not a string parameter
assert.throws(function() {tls.getLegacyCiphers(1);});
assert.throws(function() {tls.getLegacyCiphers(1);}, TypeError);
// too many parameters
assert.throws(function() {tls.getLegacyCiphers('abc', 'extra');});
assert.throws(function() {tls.getLegacyCiphers('abc', 'extra');}, TypeError);
// ah, just right
assert.doesNotThrow(function() {tls.getLegacyCiphers('v0.10.38');});