@@ -3017,7 +3017,7 @@ describe(`${NodeManager.name}`, () => {
30173017 ) ;
30183018
30193019 // We have now proved that a node can request access to the network from a node with network authority.
3020- // Now We should be able to connect while authenticated to the seed node.
3020+ // Now we should be able to connect while authenticated to the seed node.
30213021
30223022 // Re-initiate authentication
30233023 await seedNode . nodeConnectionManager . destroyConnection ( node1Id , true ) ;
@@ -3030,9 +3030,7 @@ describe(`${NodeManager.name}`, () => {
30303030
30313031 const networkAccess =
30323032 await node1 . nodeManager . getClaimNetworkAccess ( network ) ;
3033- if ( networkAccess == null ) {
3034- throw new Error ( 'network access claim not found' ) ;
3035- }
3033+ if ( networkAccess == null ) fail ( 'network access claim not found' ) ;
30363034 claimNetworkAccessUtils . verifyClaimNetworkAccess (
30373035 networkNodeId ,
30383036 node1Id ,
@@ -3096,15 +3094,17 @@ describe(`${NodeManager.name}`, () => {
30963094
30973095 // Check the claim once we have re-authenticated
30983096 const token1 = await node1 . nodeManager . getClaimNetworkAccess ( network ) ;
3099- if ( token1 == null ) throw new Error ( 'network access claim not found' ) ;
3097+ if ( token1 == null ) fail ( 'network access claim not found' ) ;
31003098 const token1Id = token1 . payload . jti ;
31013099
31023100 // Try claiming again
3103- await expect ( node1 . nodeManager . claimNetwork ( seedNodeId , network ) ) . toReject ( ) ;
3101+ await expect (
3102+ node1 . nodeManager . claimNetwork ( seedNodeId , network ) ,
3103+ ) . toReject ( ) ;
31043104
31053105 // The token should not have changed
31063106 const token2 = await node1 . nodeManager . getClaimNetworkAccess ( network ) ;
3107- if ( token2 == null ) throw new Error ( 'network access claim not found' ) ;
3107+ if ( token2 == null ) fail ( 'network access claim not found' ) ;
31083108 const token2Id = token2 . payload . jti ;
31093109 expect ( token1Id ) . toBe ( token2Id ) ;
31103110 } ) ;
0 commit comments