@@ -309,7 +309,7 @@ describe('NodeRSA', function () {
309309
310310 it ( 'should load public key from (not trimmed) PKCS8-PEM string' , function ( ) {
311311 publicNodeRSA = new NodeRSA ( publicKeyPEMNotTrimmed ) ;
312- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
312+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
313313 assert ( publicNodeRSA . isPublic ( ) ) ;
314314 assert ( publicNodeRSA . isPublic ( true ) ) ;
315315 assert ( ! publicNodeRSA . isPrivate ( ) ) ;
@@ -345,7 +345,7 @@ describe('NodeRSA', function () {
345345 it ( 'should gracefully handle data outside of encapsulation boundaries for pkcs1 public keys' , function ( ) {
346346 let publicFileWithNoise = 'Lorem ipsum' + fs . readFileSync ( keysFolder + 'public_pkcs1.pem' ) + 'dulce et decorum' ;
347347 let publicNodeRSA = new NodeRSA ( publicFileWithNoise ) ;
348- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
348+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
349349 assert ( publicNodeRSA . isPublic ( ) ) ;
350350 assert ( publicNodeRSA . isPublic ( true ) ) ;
351351 assert ( ! publicNodeRSA . isPrivate ( ) ) ;
@@ -360,7 +360,7 @@ describe('NodeRSA', function () {
360360 it ( 'should gracefully handle data outside of encapsulation boundaries for pkcs8 public keys' , function ( ) {
361361 let publicFileWithNoise = 'Lorem ipsum' + fs . readFileSync ( keysFolder + 'public_pkcs8.pem' ) + 'dulce et decorum' ;
362362 let publicNodeRSA = new NodeRSA ( publicFileWithNoise ) ;
363- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
363+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
364364 assert ( publicNodeRSA . isPublic ( ) ) ;
365365 assert ( publicNodeRSA . isPublic ( true ) ) ;
366366 assert ( ! publicNodeRSA . isPrivate ( ) ) ;
0 commit comments