File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -133,17 +133,19 @@ const objects = [
133133}
134134
135135{
136- try {
137- v8 . Serializer ( ) ;
138- } catch ( e ) {
139- const m = "Class constructor Serializer cannot be invoked without 'new'" ;
140- assert . strictEqual ( e . message , m ) ;
141- }
142-
143- try {
144- v8 . Deserializer ( ) ;
145- } catch ( e ) {
146- const m = "Class constructor Deserializer cannot be invoked without 'new'" ;
147- assert . strictEqual ( e . message , m ) ;
148- }
136+ assert . throws (
137+ ( ) => {
138+ v8 . Serializer ( ) ;
139+ } ,
140+ Error ,
141+ "Class constructor Serializer cannot be invoked without 'new'"
142+ ) ;
143+
144+ assert . throws (
145+ ( ) => {
146+ v8 . Derializer ( ) ;
147+ } ,
148+ Error ,
149+ "Class constructor Deserializer cannot be invoked without 'new'"
150+ ) ;
149151}
You can’t perform that action at this time.
0 commit comments