Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test: test-tls-cipher-list test error type
Browse files Browse the repository at this point in the history
test that the type of error thrown is correct
  • Loading branch information
jasnell committed Apr 23, 2015
1 parent 41ec32f commit b450336
Showing 1 changed file with 4 additions and 4 deletions.
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');});

0 comments on commit b450336

Please sign in to comment.