File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import * as database from './providers/database';
55import * as firestore from './providers/firestore' ;
66import * as pubsub from './providers/pubsub' ;
77import * as storage from './providers/storage' ;
8+ import { FirebaseFunctionsTest } from './lifecycle' ;
89
910export interface LazyFeatures {
1011 mockConfig : typeof mockConfig ;
@@ -31,5 +32,5 @@ export const features: LazyFeatures = {
3132} ;
3233
3334export interface FeaturesList extends LazyFeatures {
34- cleanup ;
35+ cleanup : InstanceType < typeof FirebaseFunctionsTest > [ 'cleanup' ] ;
3536}
Original file line number Diff line number Diff line change @@ -24,16 +24,19 @@ import { AppOptions } from 'firebase-admin';
2424import { merge } from 'lodash' ;
2525
2626import { FirebaseFunctionsTest } from './lifecycle' ;
27- import { features as lazyFeatures , FeaturesList } from './features' ;
27+ import { FeaturesList } from './features' ;
2828
29- export = ( firebaseConfig ?: AppOptions , pathToServiceAccountKey ?: string ) => {
29+ export = (
30+ firebaseConfig ?: AppOptions ,
31+ pathToServiceAccountKey ?: string
32+ ) : FeaturesList => {
3033 const test = new FirebaseFunctionsTest ( ) ;
3134 test . init ( firebaseConfig , pathToServiceAccountKey ) ;
3235 // Ensure other files get loaded after init function, since they load `firebase-functions`
3336 // which will issue warning if process.env.FIREBASE_CONFIG is not yet set.
34- let features = require ( './features' ) . features as typeof lazyFeatures ;
37+ let features = require ( './features' ) . features ;
3538 features = merge ( { } , features , {
3639 cleanup : ( ) => test . cleanup ( ) ,
3740 } ) ;
38- return features as FeaturesList ;
41+ return features ;
3942} ;
You can’t perform that action at this time.
0 commit comments