{"id":25829,"library":"karma-systemjs","title":"karma-systemjs","description":"A Karma plugin adapter for loading test files via SystemJS module loader instead of script tags. Current version 0.16.0 disables SystemJS bundles by default; set useBundles: true to enable. Supports transpilers like Babel and TypeScript. Key differentiator: integrates SystemJS module loading into Karma test runner for testing ES modules with transpilation. Requires manual configuration of SystemJS config file and serving of dependencies. Note: The project appears to be in maintenance mode with limited recent activity.","status":"maintenance","version":"0.16.0","language":"javascript","source_language":"en","source_url":"https://github.com/rolaveric/karma-systemjs","tags":["javascript","karma-plugin","karma-adapter","systemjs"],"install":[{"cmd":"npm install karma-systemjs","lang":"bash","label":"npm"},{"cmd":"yarn add karma-systemjs","lang":"bash","label":"yarn"},{"cmd":"pnpm add karma-systemjs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required runtime dependency for module loading","package":"systemjs","optional":false},{"reason":"Required for polyfilling ES6 module loading in older browsers (e.g., PhantomJS)","package":"es6-module-loader","optional":false},{"reason":"Optional transpiler plugin for Babel support","package":"systemjs-plugin-babel","optional":true},{"reason":"Provides Function.prototype.bind for PhantomJS v1.x compatibility","package":"phantomjs-polyfill","optional":true}],"imports":[{"note":"karma-systemjs is a Karma plugin, not imported directly. Add to plugins array in karma.conf.js.","wrong":"require('karma-systemjs')","symbol":"default (plugin)","correct":"plugins: ['karma-systemjs']"},{"note":"Use the short name 'systemjs' in the frameworks array. Must be the first framework in the list.","wrong":"frameworks: ['karma-systemjs']","symbol":"framework (systemjs)","correct":"frameworks: ['systemjs']"},{"note":"System is available globally after loading systemjs, not imported as ES module inside Node.js config files.","wrong":"import { System } from 'systemjs'","symbol":"System (global)","correct":"System.config({...})"}],"quickstart":{"code":"// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['systemjs', 'jasmine'],\n    files: [\n      'test/**/*.spec.js'\n    ],\n    plugins: ['karma-systemjs', 'karma-jasmine', 'karma-chrome-launcher'],\n    systemjs: {\n      configFile: 'system.conf.js',\n      serveFiles: [\n        'lib/**/*.js'\n      ],\n      config: {\n        paths: {\n          'angular-mocks': 'node_modules/angular-mocks/angular-mocks.js'\n        }\n      },\n      useBundles: false\n    },\n    browsers: ['Chrome']\n  });\n};","lang":"javascript","description":"Configures Karma to use SystemJS for loading test files via System.import(), with a separate system config file and additional serve files."},"warnings":[{"fix":"Set systemjs.useBundles: true in your Karma config if you rely on SystemJS bundles.","message":"In v0.16.0, SystemJS bundles are no longer automatically loaded. You must set useBundles: true in the systemjs config to enable bundle loading.","severity":"breaking","affected_versions":">=0.16.0"},{"fix":"Ensure that the karma config arrays either contain all needed values or use a different approach to avoid data loss.","message":"In v0.9.0, arrays in SystemJS config file are overwritten by arrays in karma config, rather than merged.","severity":"breaking","affected_versions":">=0.9.0 <0.16.0"},{"fix":"In your SystemJS config, specify the transpiler path under paths or map; karma-systemjs will handle serving automatically.","message":"The transpiler (e.g., plugin-babel, traceur) must be served as served:true, included:false in Karma file patterns since v0.13.0.","severity":"gotcha","affected_versions":">=0.13.0"},{"fix":"Install phantomjs-polyfill and include it in your SystemJS config.","message":"PhantomJS v1.x lacks Function.prototype.bind, causing transpiler errors: 'TypeError: undefined is not a function'","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using SystemJS 0.21+ which includes its own polyfill; remove es6-module-loader dependency if not needed.","message":"es6-module-loader is deprecated in favor of systemjs itself; modern SystemJS versions may not need it.","severity":"deprecated","affected_versions":">=0.16.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'phantomjs-polyfill' to your SystemJS config: System.config({ map: { 'phantomjs-polyfill': 'node_modules/phantomjs-polyfill/bind-polyfill.js' } });","cause":"PhantomJS v1.x does not support Function.prototype.bind, required by transpilers.","error":"TypeError: 'undefined' is not a function (evaluating 'Function.prototype.bind')"},{"fix":"Ensure all modules are properly defined as ES modules or System.register; avoid anonymous AMD define() calls.","cause":"Files loaded via System.import() that contain AMD define() blocks may conflict with SystemJS's own AMD detection.","error":"Error: Mismatched anonymous define() module: function (...) { ... }"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}