@@ -44,7 +44,7 @@ describe('Issuer', () => {
4444
4545 after ( nock . cleanAll ) ;
4646 afterEach ( function ( ) {
47- if ( LRU . prototype . get . restore ) LRU . prototype . get . restore ( ) ;
47+ if ( LRU . LRUCache . prototype . get . restore ) LRU . LRUCache . prototype . get . restore ( ) ;
4848 } ) ;
4949
5050 it ( 'does not refetch immidiately' , function ( ) {
@@ -69,7 +69,7 @@ describe('Issuer', () => {
6969 } ) ;
7070
7171 it ( 'asks to fetch if the keystore is stale and new key definition is requested' , function ( ) {
72- sinon . stub ( LRU . prototype , 'get' ) . returns ( undefined ) ;
72+ sinon . stub ( LRU . LRUCache . prototype , 'get' ) . returns ( undefined ) ;
7373 return issuerInternal . queryKeyStore
7474 . call ( this . issuer , { use : 'sig' , alg : 'RS256' , kid : 'yeah' } )
7575 . then ( fail , ( ) => {
@@ -94,7 +94,7 @@ describe('Issuer', () => {
9494 } ) ;
9595
9696 it ( 'requires a kid is provided in definition if more keys are in the storage' , function ( ) {
97- sinon . stub ( LRU . prototype , 'get' ) . returns ( undefined ) ;
97+ sinon . stub ( LRU . LRUCache . prototype , 'get' ) . returns ( undefined ) ;
9898 return this . keystore . generate ( 'RSA' ) . then ( ( ) => {
9999 nock ( 'https://op.example.com' ) . get ( '/certs' ) . reply ( 200 , this . keystore . toJWKS ( ) ) ;
100100
@@ -110,7 +110,7 @@ describe('Issuer', () => {
110110 } ) ;
111111
112112 it ( 'multiple keys can match the JWT header' , function ( ) {
113- sinon . stub ( LRU . prototype , 'get' ) . returns ( undefined ) ;
113+ sinon . stub ( LRU . LRUCache . prototype , 'get' ) . returns ( undefined ) ;
114114 const { kid } = this . keystore . get ( { kty : 'RSA' } ) ;
115115 return this . keystore . generate ( 'RSA' , undefined , { kid } ) . then ( ( ) => {
116116 nock ( 'https://op.example.com' ) . get ( '/certs' ) . reply ( 200 , this . keystore . toJWKS ( ) ) ;
0 commit comments