{"id":25825,"library":"karma-es6-shim","title":"karma-es6-shim","description":"Karma plugin that includes both es5-shim and es6-shim polyfills for testing ES6 features in PhantomJS. Version 1.0.0, last updated in 2016. Designed for projects using AMD/RequireJS and Babel transpilation. Simplifies configuration by ensuring both shims are loaded in the correct order for PhantomJS, which lacks ES5 and ES6 support. No active maintenance since 2016.","status":"abandoned","version":"1.0.0","language":"javascript","source_language":"en","source_url":"git@github.com:radify/karma-es6-shim","tags":["javascript","karma","karma-plugin","karma-framework","es6-shim","shim"],"install":[{"cmd":"npm install karma-es6-shim","lang":"bash","label":"npm"},{"cmd":"yarn add karma-es6-shim","lang":"bash","label":"yarn"},{"cmd":"pnpm add karma-es6-shim","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for Karma framework integration","package":"karma","optional":false},{"reason":"loaded as a dependency for ES5 polyfill","package":"es5-shim","optional":false},{"reason":"loaded as a dependency for ES6 polyfill","package":"es6-shim","optional":false}],"imports":[{"note":"Register it as a framework name, not a plugin. Must be listed after 'requirejs' in frameworks array.","wrong":"plugins: ['karma-es6-shim']","symbol":"framework:es6-shim","correct":"frameworks: ['es6-shim']"},{"note":"This package is a Karma framework, not a module to import. It requires no require() for configuration.","wrong":"const es6Shim = require('karma-es6-shim')","symbol":"Default import","correct":"// no import needed; just add 'es6-shim' to 'frameworks'"},{"note":"Karma config files are CommonJS. Do not use ESM imports for this package.","wrong":"import 'karma-es6-shim'","symbol":"ESM import","correct":"// Not applicable; configuration is done in karma.conf.js via CommonJS"}],"quickstart":{"code":"// Install the package\nnpm install karma-es6-shim --save-dev\n\n// In karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['requirejs', 'es6-shim'],\n    // ... other config\n  });\n};","lang":"javascript","description":"Install karma-es6-shim and add 'es6-shim' to the frameworks array after 'requirejs' in karma.conf.js to load ES5 and ES6 polyfills for PhantomJS."},"warnings":[{"fix":"Consider using Karma with a modern headless browser (e.g., ChromeHeadless) that natively supports ES6, or use Babel's polyfill instead.","message":"Package is abandoned; last release in 2016. ES6-shim is largely unnecessary for modern browsers and PhantomJS is no longer maintained.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure frameworks array is ordered as ['requirejs', 'es6-shim'].","message":"Must add 'es6-shim' to frameworks AFTER 'requirejs', not as a plugin. If listed incorrectly, shims may not load.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"This package is designed for AMD/RequireJS setups. For other module systems, use es6-shim directly as a plugin or via script tags.","message":"Requires PhantomJS with RequireJS. If not using RequireJS, the polyfills may not be injected properly.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure 'es6-shim' is included in karma.conf.js frameworks array after 'requirejs'.","cause":"PhantomJS does not support ES6 methods like Array.find, and the package is not loading polyfills.","error":"Uncaught TypeError: Array.prototype.find is not a function"},{"fix":"Run 'npm install karma-es6-shim --save-dev' and verify frameworks array in karma.conf.js.","cause":"Missing npm dependency or incorrect Karma configuration (e.g., frameworks order).","error":"Module 'es6-shim' is not available"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}