Skip to content

Commit

Permalink
test: change some regular expressions to strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ejc-main committed Feb 14, 2017
1 parent a0f6e1e commit a20d68e
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('');
},
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
/setPrivateKey is not a function$/.source),
new RegExp('^TypeError: crypto\\.getDiffieHellman\\(\\.\\.\\.\\)\\.' +
'setPrivateKey is not a function$'),
'crypto.getDiffieHellman(\'modp1\').setPrivateKey(\'\') ' +
'failed to throw the expected error.'
);
assert.throws(
function() {
crypto.getDiffieHellman('modp1').setPublicKey('');
},
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
/setPublicKey is not a function$/.source),
new RegExp('^TypeError: crypto\\.getDiffieHellman\\(\\.\\.\\.\\)\\.' +
'setPublicKey is not a function$'),
'crypto.getDiffieHellman(\'modp1\').setPublicKey(\'\') ' +
'failed to throw the expected error.'
);
Expand Down

0 comments on commit a20d68e

Please sign in to comment.