Socket
Book a DemoInstallSign in
Socket

@microsoft/gulp-core-build-karma

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/gulp-core-build-karma

`gulp-core-build-karma` is a `gulp-core-build` subtask for running unit tests using karma/phantomjs/mocha/chai. This setup allows you to run browser based testing.

npmnpm
Version
4.6.56
Version published
Weekly downloads
746
31.11%
Maintainers
2
Weekly downloads
 
Created
Source

@microsoft/gulp-core-build-karma

gulp-core-build-karma is a gulp-core-build subtask for running unit tests using karma/phantomjs/mocha/chai. This setup allows you to run browser based testing.

npm version Build Status Dependencies

Description

gulp-core-build-karma is a gulp-core-build plugin which uses KarmaJS to configure a browser to run a bundle of code, primarily unit tests using mocha.

KarmaTask

Usage

Simply register the task in a gulp-core-build tree, and it will automatically look for a karma.config.js file. The default karma config, which can be obtained by running the task with the --initkarma flag, always looks for a file called src/tests.js and uses this as the entry point for the bundle which will be tested.

The task will launch the PhantomJS browser and begin automatically running mocha tests.

Once testing is complete, a coverage report is written to the coverage folder.

A number of plugins for karma are automatically configured, including:

  • karma-webpack
  • karma-mocha
  • karma-coverage
  • karma-phantomjs-launcher
  • karma-sinon-chai

Configuration

karmaConfigPath

Sets the path to the Karma Configuration file to use. If one has not been created, this task will prompt the user to run it again with the --initkarma flag.

Default: './karma.config.json'

License

MIT

FAQs

Package last updated on 07 Jan 2019

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