Skip to content

Commit

Permalink
🧪 test: Fix style.
Browse files Browse the repository at this point in the history
Start constructor names with uppercase letter.
  • Loading branch information
make-github-pseudonymous-again committed Mar 15, 2021
1 parent 2c3ca62 commit 7cf20f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/src/error.js
Expand Up @@ -22,19 +22,19 @@ const errors = [
StopIteration ,
] ;

function willThrow ( error ) {
return function () { throw new error(); } ;
function willThrow ( SpecificError ) {
return function () { throw new SpecificError(); } ;
}

test( 'error' , t => {

const r = Math.random();
const s = r.toString();

for ( const error of errors ) {
t.truthy( new error( ) ) ;
t.is( ( new error( r ) ).message , s ) ;
t.throws( willThrow(error) , { instanceOf: error } ) ;
for ( const SpecificError of errors ) {
t.truthy( new SpecificError( ) ) ;
t.is( ( new SpecificError( r ) ).message , s ) ;
t.throws( willThrow(SpecificError) , { instanceOf: SpecificError } ) ;
}

}) ;

0 comments on commit 7cf20f8

Please sign in to comment.