Skip to content

Commit a20d68e

Browse files
committed
test: change some regular expressions to strings
1 parent a0f6e1e commit a20d68e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/pummel/test-crypto-dh.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ assert.throws(
2020
function() {
2121
crypto.getDiffieHellman('modp1').setPrivateKey('');
2222
},
23-
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
24-
/setPrivateKey is not a function$/.source),
23+
new RegExp('^TypeError: crypto\\.getDiffieHellman\\(\\.\\.\\.\\)\\.' +
24+
'setPrivateKey is not a function$'),
2525
'crypto.getDiffieHellman(\'modp1\').setPrivateKey(\'\') ' +
2626
'failed to throw the expected error.'
2727
);
2828
assert.throws(
2929
function() {
3030
crypto.getDiffieHellman('modp1').setPublicKey('');
3131
},
32-
new RegExp(/^TypeError: crypto\.getDiffieHellman\(\.\.\.\)\./.source +
33-
/setPublicKey is not a function$/.source),
32+
new RegExp('^TypeError: crypto\\.getDiffieHellman\\(\\.\\.\\.\\)\\.' +
33+
'setPublicKey is not a function$'),
3434
'crypto.getDiffieHellman(\'modp1\').setPublicKey(\'\') ' +
3535
'failed to throw the expected error.'
3636
);

0 commit comments

Comments
 (0)