Skip to content

Commit

Permalink
Unit test upgraded (using 'start with' assertion)
Browse files Browse the repository at this point in the history
  • Loading branch information
cronvel committed Jul 30, 2022
1 parent 7eeda9e commit 3086589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/string-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,8 @@ describe( "inspectError()" , () => {
ae = new AggregateError( [e1,e2,e3] , 'Aggregated Error!' ) ;

// /!\ Assert should support startsWith and endsWith
expect( string.inspectError( e1 ).startsWith( "Error [Error]: Error1!\n" ) ).to.be.true() ;
expect( string.inspectError( ae ).startsWith( "AggregateError [AggregateError]: Aggregated Error!\n" ) ).to.be.true() ;
expect( string.inspectError( e1 ) ).to.start.with( "Error [Error]: Error1!\n" ) ;
expect( string.inspectError( ae ) ).to.start.with( "AggregateError [AggregateError]: Aggregated Error!\n" ) ;

expect( string.inspectError( 'string error!' ) ).to.be( "[not an Error] string error!\n" ) ;
expect( string.inspectError( { name: 'Err' , message: 'Wooops!' } ) ).to.be( "[not an Error] Object [Err]: Wooops!\n" ) ;
Expand Down

0 comments on commit 3086589

Please sign in to comment.