Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-sharding

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-sharding

Allows tests to be distributed across multiple sequentially loaded browsers

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
456
decreased by-10.94%
Maintainers
1
Weekly downloads
 
Created
Source

karma-sharding

js-standard-style npm version npm downloads

Allows Karma tests to be distributed across multiple sequentially loaded browsers

Installation

The easiest way is to install karma-sharding as a devDependency, by running

npm install karma karma-sharding --save-dev

Examples

Basic

// karma.conf.js
module.exports = function(config) {
  config.set({
    files: [
      'src/**/*.js',
      'test/**/*.js'
    ],

    // sharding replaces the coverage reporter which generates the coverage
    reporters: ['progress', 'sharding'],

    frameworks: ['sharding'], // this will load the framework and beforeMiddleware

    preprocessors: {
      // source files, that you wanna generate coverage for
      // do not include tests or libraries
      // (these files will be instrumented by Istanbul)
      'src/**/*.js': ['coverage'] // coverage is loaded from karma-coverage by karma-sharding
    },

    // optionally, configure the reporter as per karma-coverage
    coverageReporter: {
      type : 'html',
      dir : 'coverage/'
    },

    browsers: ['ChromeHeadless', 'ChromeHeadless'] // this will split the tests into two sets
  });
};

For more information on Karma see the homepage.

Keywords

FAQs

Package last updated on 11 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc