karma-firebase-server-plugin

starts a local firebase server when karma starts, so that all firebase tests can work offline

Usage no npm install needed!

<script type="module">
  import karmaFirebaseServerPlugin from 'https://cdn.skypack.dev/karma-firebase-server-plugin';
</script>

README

karma-firebase-server-plugin

This plugin will start and stop a firebase server for integration testing locally apps that rely on a firebase database connection

Getting Started

npm install cucumber --save-dev
npm install karma --save-dev
npm install karma-cucumber-js-latest --save-dev

Configuring karma.conf.js

...
frameworks: ['firebase-server'],
...
plugins: [
  ...
  require("karma-firebase-server-plugin")
  ...
],
...
client: { 
  ...
  firebaseServer: {
    port: NUMBER (Optional), 
    name: STRING:LocalServerName (Optional),
    file: STRING:PathToDefaultDatabaseValues.json (Optional),
    rules: STRING:PathToDataBasePermisions.json (Optional),
    secret: STRING (Optional),
    debugEnvVariable: STRING (Optional),
    log: BOOLEAN (Optional),
    verbose: BOOLEAN (Optional)
  }
  ... 
}
...

Argument Options

Argument Options

License

Copyright (c) 2018 Timothy Gross. This project is licensed under the terms of the MIT license.