karma-firebase 🔥
A simple plugin for integration
and e2e
testing with Firebase. The plugin is based on firebase-server
.
Installation
The easiest way is to install karma-firebase
is by doing the following way:
$ npm install karma-firebase --save-dev
Configuration
Once karma-firebase
is installed you can make use of it by adding the plugin to your karma configuration file.
karma.conf.js
module { config}
You are able to configure the plugin within the firebase
property.
Property | Description | default value |
---|---|---|
port | The port to launch firebase-server . |
5000 |
data | Initial data to load firebase-server with. |
{} |
Usage
Once the configuration is setup you can make use of the firebase-server
within your tests.
Simply initialize the firebase app the following way:
// initialize firebase with the port you've specifiedfirebase; // simply create a database referenceref = firebase; // ... and happy testing
License
MIT