From 7cf20f8907011324ce9c0caf486690151aff4408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Mon, 15 Mar 2021 10:53:52 +0100 Subject: [PATCH] :test_tube: test: Fix style. Start constructor names with uppercase letter. --- test/src/error.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/src/error.js b/test/src/error.js index fdd7727..fd53c78 100644 --- a/test/src/error.js +++ b/test/src/error.js @@ -22,8 +22,8 @@ const errors = [ StopIteration , ] ; -function willThrow ( error ) { - return function () { throw new error(); } ; +function willThrow ( SpecificError ) { + return function () { throw new SpecificError(); } ; } test( 'error' , t => { @@ -31,10 +31,10 @@ 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 } ) ; } }) ;