1. karma-phantomjs-shim
Provides shims for PhantomJS
karma-phantomjs-shim
Package: karma-phantomjs-shim
Created by: tschaub
Last modified: Sun, 19 Jun 2022 08:03:13 GMT
Version: 1.5.0
License: MIT
Downloads: 22,237
Repository: https://github.com/tschaub/karma-phantomjs-shim

Install

npm install karma-phantomjs-shim
yarn add karma-phantomjs-shim

karma-phantomjs-shim

Provides shims when running tests in PhantomJS.

Use

Install the plugin with npm:

npm install karma-phantomjs-shim

Configure Karma to load the plugin as a framework:

 module.exports = function(config) {
  config.set({
    frameworks: ['phantomjs-shim']
    // additional settings here ...
  });
};

If you've defined the plugins section in your Karma config file you'll also need to add a karma-phantomjs-shim entry to your plugins array:

 module.exports = function(config) {
  config.set({
    // [...]
    plugins: ['karma-phantomjs-shim']
    // [...]
  });
};

Shims

  • CustomEvent
  • Function.prototype.bind
  • Object.assign
  • String.prototype.includes
  • String.prototype.repeat
  • String.prototype.startsWith
  • requestAnimationFrame

Want more? Pull requests welcome!

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin