Skip to content

Commit affcf5e

Browse files
devversiontinayuangao
authored andcommitted
build: fix screenshot functions export (#4807)
* The Firebase CLI is not able to properly detect the Firebase functions for the screenshot project. This is because the functions are not re-exported.
1 parent 6c9ca95 commit affcf5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/screenshot-test/functions/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ require('ts-node').register({
1414
project: path.join(__dirname, 'tsconfig.json')
1515
});
1616

17-
require('./screenshot-functions');
17+
const functionExports = require('./screenshot-functions');
18+
19+
// Re-export every firebase function from TypeScript
20+
Object.keys(functionExports).forEach(fnName => {
21+
module.exports[fnName] = functionExports[fnName];
22+
});

0 commit comments

Comments
 (0)