diff options
author | Aditya Anand <aditya.anandmc@gmail.com> | 2017-08-03 19:54:36 +0530 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-08-07 19:13:41 -0400 |
commit | ad664eae7d7a222ae49f97cd5344f3b6be2b4d7b (patch) | |
tree | 36e283f8207897e077b14c49b88c278306f11a0e /test/parallel/test-v8-serdes.js | |
parent | 0f325aaaeb3f97024738114e7c11def8a179f6f8 (diff) | |
download | android-node-v8-ad664eae7d7a222ae49f97cd5344f3b6be2b4d7b.tar.gz android-node-v8-ad664eae7d7a222ae49f97cd5344f3b6be2b4d7b.tar.bz2 android-node-v8-ad664eae7d7a222ae49f97cd5344f3b6be2b4d7b.zip |
test: mitigate RegEx exceeding 80 chars
Format commit wrapping lines containing RegEx and exceeding 80
chars.
PR-URL: https://github.com/nodejs/node/pull/14607
Fixes: https://github.com/nodejs/node/issues/14586
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'test/parallel/test-v8-serdes.js')
-rw-r--r-- | test/parallel/test-v8-serdes.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js index f59970209b..981e196157 100644 --- a/test/parallel/test-v8-serdes.js +++ b/test/parallel/test-v8-serdes.js @@ -20,6 +20,11 @@ const objects = [ circular ]; +const serializerTypeError = + /^TypeError: Class constructor Serializer cannot be invoked without 'new'$/; +const deserializerTypeError = + /^TypeError: Class constructor Deserializer cannot be invoked without 'new'$/; + { const ser = new v8.DefaultSerializer(); ser.writeHeader(); @@ -133,13 +138,6 @@ const objects = [ } { - assert.throws( - () => { v8.Serializer(); }, - /^TypeError: Class constructor Serializer cannot be invoked without 'new'$/ - ); - - assert.throws( - () => { v8.Deserializer(); }, - /^TypeError: Class constructor Deserializer cannot be invoked without 'new'$/ - ); + assert.throws(v8.Serializer, serializerTypeError); + assert.throws(v8.Deserializer, deserializerTypeError); } |