🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

karma-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-polyfill

Load polyfills from polyfill.io before running Karma tests

1.1.0
latest
Source
npm
Version published
Weekly downloads
259
-46.82%
Maintainers
1
Weekly downloads
 
Created
Source

karma-polyfill

Loads polyfills from https://polyfill.io/ before running tests.

Use

Install the plugin with npm:

npm install karma-polyfill --save-dev

Configure Karma to load the plugin as a framework and specify the features you need polyfilled:

module.exports = function(config) {
  config.set({
    frameworks: ['polyfill'],
    polyfill: ['Promise', 'fetch'] // etc.
    // additional settings here ...
  });
};

The above configuration will load the https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise,fetch script before your tests run.

Note that if you've included a plugins section in your Karma config, you will need to add a karma-polyfill entry to your plugins array.

Keywords

karma-plugin

FAQs

Package last updated on 18 Feb 2020

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