@@ -20,27 +20,27 @@ import { _FirebaseInstallationsInternal } from '@firebase/installations';
2020import { expect } from 'chai' ;
2121
2222describe ( 'InstallationIdProvider' , ( ) => {
23- it ( 'should cache the FID after the first call' , async ( ) => {
23+ it ( 'should cache the installation id after the first call' , async ( ) => {
2424 let callCount = 0 ;
2525 const mockInstallations = {
2626 getId : async ( ) => {
2727 callCount ++ ;
28- return 'fid -123' ;
28+ return 'iid -123' ;
2929 }
3030 } as unknown as _FirebaseInstallationsInternal ;
3131
3232 const provider = new InstallationIdProvider ( mockInstallations ) ;
3333
3434 const attr1 = await provider . getAttribute ( ) ;
35- expect ( attr1 ) . to . deep . equal ( [ 'user.id' , 'fid -123' ] ) ;
35+ expect ( attr1 ) . to . deep . equal ( [ 'user.id' , 'iid -123' ] ) ;
3636 expect ( callCount ) . to . equal ( 1 ) ;
3737
3838 const attr2 = await provider . getAttribute ( ) ;
39- expect ( attr2 ) . to . deep . equal ( [ 'user.id' , 'fid -123' ] ) ;
39+ expect ( attr2 ) . to . deep . equal ( [ 'user.id' , 'iid -123' ] ) ;
4040 expect ( callCount ) . to . equal ( 1 ) ; // Should still be 1
4141 } ) ;
4242
43- it ( 'should not cache if FID is null' , async ( ) => {
43+ it ( 'should not cache if installation id is null' , async ( ) => {
4444 let callCount = 0 ;
4545 let returnValue : string | null = null ;
4646 const mockInstallations = {
@@ -56,14 +56,14 @@ describe('InstallationIdProvider', () => {
5656 expect ( attr1 ) . to . be . null ;
5757 expect ( callCount ) . to . equal ( 1 ) ;
5858
59- returnValue = 'fid -456' ;
59+ returnValue = 'iid -456' ;
6060 const attr2 = await provider . getAttribute ( ) ;
61- expect ( attr2 ) . to . deep . equal ( [ 'user.id' , 'fid -456' ] ) ;
61+ expect ( attr2 ) . to . deep . equal ( [ 'user.id' , 'iid -456' ] ) ;
6262 expect ( callCount ) . to . equal ( 2 ) ;
6363
6464 // Should cache now
6565 const attr3 = await provider . getAttribute ( ) ;
66- expect ( attr3 ) . to . deep . equal ( [ 'user.id' , 'fid -456' ] ) ;
66+ expect ( attr3 ) . to . deep . equal ( [ 'user.id' , 'iid -456' ] ) ;
6767 expect ( callCount ) . to . equal ( 2 ) ;
6868 } ) ;
6969} ) ;
0 commit comments