@@ -26,8 +26,8 @@ const assert = require('assert');
2626assert . ok ( process . stdout . writable ) ;
2727assert . ok ( process . stderr . writable ) ;
2828// Support legacy API
29- assert . strictEqual ( 'number' , typeof process . stdout . fd ) ;
30- assert . strictEqual ( 'number' , typeof process . stderr . fd ) ;
29+ assert . strictEqual ( typeof process . stdout . fd , 'number' ) ;
30+ assert . strictEqual ( typeof process . stderr . fd , 'number' ) ;
3131
3232assert . doesNotThrow ( function ( ) {
3333 process . once ( 'warning' , common . mustCall ( ( warning ) => {
@@ -123,35 +123,35 @@ const expectedStrings = [
123123] ;
124124
125125for ( const expected of expectedStrings ) {
126- assert . strictEqual ( `${ expected } \n` , strings . shift ( ) ) ;
127- assert . strictEqual ( `${ expected } \n` , errStrings . shift ( ) ) ;
126+ assert . strictEqual ( strings . shift ( ) , `${ expected } \n` ) ;
127+ assert . strictEqual ( errStrings . shift ( ) , `${ expected } \n` ) ;
128128}
129129
130130for ( const expected of expectedStrings ) {
131- assert . strictEqual ( `${ expected } \n` , strings . shift ( ) ) ;
132- assert . strictEqual ( `${ expected } \n` , errStrings . shift ( ) ) ;
131+ assert . strictEqual ( strings . shift ( ) , `${ expected } \n` ) ;
132+ assert . strictEqual ( errStrings . shift ( ) , `${ expected } \n` ) ;
133133}
134134
135- assert . strictEqual ( "{ foo: 'bar', inspect: [Function: inspect] }\n" ,
136- strings . shift ( ) ) ;
137- assert . strictEqual ( "{ foo: 'bar', inspect: [Function: inspect] }\n" ,
138- strings . shift ( ) ) ;
135+ assert . strictEqual ( strings . shift ( ) ,
136+ "{ foo: 'bar', inspect: [Function: inspect] }\n" ) ;
137+ assert . strictEqual ( strings . shift ( ) ,
138+ "{ foo: 'bar', inspect: [Function: inspect] }\n" ) ;
139139assert . ok ( strings . shift ( ) . includes ( 'foo: [Object]' ) ) ;
140140assert . strictEqual ( strings . shift ( ) . includes ( 'baz' ) , false ) ;
141141assert . ok ( / ^ l a b e l : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
142142assert . ok ( / ^ _ _ p r o t o _ _ : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
143143assert . ok ( / ^ c o n s t r u c t o r : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
144144assert . ok ( / ^ h a s O w n P r o p e r t y : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
145145
146- assert . strictEqual ( 'Trace: This is a {"formatted":"trace"} 10 foo' ,
147- errStrings . shift ( ) . split ( '\n' ) . shift ( ) ) ;
146+ assert . strictEqual ( errStrings . shift ( ) . split ( '\n' ) . shift ( ) ,
147+ 'Trace: This is a {"formatted":"trace"} 10 foo' ) ;
148148
149- assert . throws ( ( ) => {
149+ common . expectsError ( ( ) => {
150150 console . assert ( false , 'should throw' ) ;
151- } , common . expectsError ( {
151+ } , {
152152 code : 'ERR_ASSERTION' ,
153153 message : / ^ s h o u l d t h r o w $ /
154- } ) ) ;
154+ } ) ;
155155
156156assert . doesNotThrow ( ( ) => {
157157 console . assert ( true , 'this should not throw' ) ;
0 commit comments