Skip to content

Commit

Permalink
test: fixed assert.throws regular expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ejc-main committed Feb 14, 2017
1 parent 5049fe6 commit a0f6e1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/pummel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ assert.throws(
function() {
crypto.getDiffieHellman('modp1').setPrivateKey('');
},
/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\.setPrivateKey/ +
/ is not a function$/,
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
/setPrivateKey is not a function$/.source),
'crypto.getDiffieHellman(\'modp1\').setPrivateKey(\'\') ' +
'failed to throw the expected error.'
);
assert.throws(
function() {
crypto.getDiffieHellman('modp1').setPublicKey('');
},
/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\.setPublicKey/ +
/ is not a function$/,
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
/setPublicKey is not a function$/.source),
'crypto.getDiffieHellman(\'modp1\').setPublicKey(\'\') ' +
'failed to throw the expected error.'
);
Expand Down

0 comments on commit a0f6e1e

Please sign in to comment.