Giter Site home page Giter Site logo

contrib-karma-brave-launcher's Introduction

karma-brave-launcher

Launcher for Brave

NOTE: Windows support is not very good at the moment (meaning, very poor). Pull requests or pointers to docs to address this are welcomed.

Installation

The easiest way is to keep karma-brave-launcher as a devDependency in your package.json, by running

$ npm install --save-dev karma-brave-launcher

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['Brave']
  });
}

You can pass list of browsers as a CLI argument too:

$ karma start --browsers Brave

CustomLaunchers

Karma allows you to pass other configuration options to the browser launchers. You do this something like the following:

module.exports = function(config) {
  config.set({
    browsers: [ 'MyEpicBraveVariation' ],
    customLaunchers: {
      MyEpicBraveVariation: {
        base: 'Brave',
        dataDir: '/some/path',
        flags: '--some-option=thing',
        startupSettings: {
          settings: {
            'general.check-default-on-startup': false
          },
          someSetting: {
          }
        }
      }
    }
  });
} 

That is, you tell Karma to use the MyEpicBraveVersion "browser". This, in turn, is defined in the configuration file as the base browser launcher (this one) with some addional configuration options.

At this time, the Brave launcher supports three configuration options:

  • dataDir: The path to the location that the browser should store its data in. You should use this if you wanted to preserve state across testing sessions. By default, this launcher will create a temporary directory for each run.
  • flags: Specify any command line flags. These are in addition to the --user-data-dir and the URL to launch.
  • startupSettings: A JavaScript object that should be used to seed the Brave session store file (${dataDir}/session-store-1). By default, this launcher uses this to keep the Brave window from being full screen, and not checking if Brave is the default browser at startup time. Note: This is not a "public" interface in Brave, so naturally these settings may break between releases.

References

For more information on Karma see the homepage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.