I've been using the Firebase Functions Shell (firebase experimental:functions:shell) and am finding it excellent for testing the firebase database and http listeners.
However it is a little annoying that I have to copy-paste test code in the shell.
Is there any way I can just write some js code in a file and then run the complete file with the Firebase shell? Without copying and pasting?
Yes, send your script the the shell's stdin.
$ firebase experimental:functions:shell < tests.js
Taken from this blog.
You may still have to terminate the shell with ctl-C. Please file a bug report if you would like to see that change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With