{"id":26478677,"url":"https://github.com/litixsoft/karma-detect-browsers","last_synced_at":"2025-04-10T04:56:04.026Z","repository":{"id":10142525,"uuid":"12217863","full_name":"litixsoft/karma-detect-browsers","owner":"litixsoft","description":"Karma runner plugin for detecting all browsers installed on the current system.","archived":false,"fork":false,"pushed_at":"2021-11-28T17:12:18.000Z","size":67,"stargazers_count":46,"open_issues_count":6,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-03T03:09:03.419Z","etag":null,"topics":["chrome","edges","firefox","javascript","karma","karma-runner-plugin","phantomjs","safari"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litixsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-19T13:50:43.000Z","updated_at":"2024-04-10T18:35:21.000Z","dependencies_parsed_at":"2022-08-30T15:41:06.965Z","dependency_job_id":null,"html_url":"https://github.com/litixsoft/karma-detect-browsers","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litixsoft%2Fkarma-detect-browsers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litixsoft%2Fkarma-detect-browsers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litixsoft%2Fkarma-detect-browsers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litixsoft%2Fkarma-detect-browsers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litixsoft","download_url":"https://codeload.github.com/litixsoft/karma-detect-browsers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161260,"owners_count":21057554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","edges","firefox","javascript","karma","karma-runner-plugin","phantomjs","safari"],"created_at":"2025-03-20T01:16:57.318Z","updated_at":"2025-04-10T04:56:04.010Z","avatar_url":"https://github.com/litixsoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-detect-browsers\n\n\u003e Karma runner plugin for detecting all browsers installed on the current system. Adds all found browsers to the browser array in the karma config file.\n\n\u003e [![NPM version](https://badge.fury.io/js/karma-detect-browsers.svg)](http://badge.fury.io/js/karma-detect-browsers)\n[![Build Status](https://secure.travis-ci.org/litixsoft/karma-detect-browsers.svg?branch=master)](https://travis-ci.org/litixsoft/karma-detect-browsers)\n[![david-dm](https://david-dm.org/litixsoft/karma-detect-browsers.svg?theme=shields.io)](https://david-dm.org/litixsoft/karma-detect-browsers/)\n[![david-dm](https://david-dm.org/litixsoft/karma-detect-browsers/dev-status.svg?theme=shields.io)](https://david-dm.org/litixsoft/karma-detect-browsers#info=devDependencies\u0026view=table)\n\n## Installation\n\nThe easiest way is to keep `karma-detect-browsers` as a devDependency in your `package.json`.\n```json\n{\n  \"devDependencies\": {\n    \"karma\": \"^0.13\",\n    \"karma-detect-browsers\": \"^2.0\"\n  }\n}\n```\n\nYou can simply do it by:\n```bash\nnpm install karma-detect-browsers --save-dev\n```\n\n## Get started\n\n* add detectBrowsers as framework and plugin to your karma config file\n* add the karma browser plugins for all the browser installed on your system\n* add the karma browser plugins to the `package.json` file\n\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['detectBrowsers'],\n\n    plugins: [\n      'karma-chrome-launcher',\n      'karma-edge-launcher',\n      'karma-firefox-launcher',\n      'karma-ie-launcher',\n      'karma-safari-launcher',\n      'karma-safaritechpreview-launcher',\n      'karma-opera-launcher',\n      'karma-phantomjs-launcher',\n      'karma-detect-browsers'\n    ]\n  });\n};\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['detectBrowsers'],\n\n    // configuration\n    detectBrowsers: {\n      // enable/disable, default is true\n      enabled: true,\n\n      // enable/disable phantomjs support, default is true\n      usePhantomJS: true,\n\n      // use headless mode, for browsers that support it, default is false\n      preferHeadless: true,\n\n      // post processing of browsers list\n      // here you can edit the list of browsers used by karma\n      postDetection: function(availableBrowsers) {\n        /* Karma configuration with custom launchers\n          customLaunchers: {\n            IE9: {\n              base: 'IE',\n              'x-ua-compatible': 'IE=EmulateIE9'\n            }\n          }\n        */\n\n          //Add IE Emulation\n          var result = availableBrowsers;\n\n          if (availableBrowsers.indexOf('IE')\u003e-1) {\n            result.push('IE9');\n          }\n\n          //Remove PhantomJS if another browser has been detected\n          if (availableBrowsers.length \u003e 1 \u0026\u0026 availableBrowsers.indexOf('PhantomJS')\u003e-1) {\n            var i = result.indexOf('PhantomJS');\n\n            if (i !== -1) {\n              result.splice(i, 1);\n            }\n          }\n\n          return result;\n        }\n    },\n\n    plugins: [\n      'karma-chrome-launcher',\n      'karma-edge-launcher',\n      'karma-firefox-launcher',\n      'karma-ie-launcher',\n      'karma-safari-launcher',\n      'karma-safaritechpreview-launcher',\n      'karma-opera-launcher',\n      'karma-phantomjs-launcher',\n      'karma-detect-browsers'\n    ]\n  });\n};\n```\n\n## Contributing\nIn lieu of a formal styleguide take care to maintain the existing coding style. Lint and test your code using [grunt](http://gruntjs.com/).\n\nYou can preview your changes by running:\n```bash\ngrunt demo\n```\n\n## Release History\n### v2.3.3\n* Fix path for Chromium browser in macOS\n\n### v2.3.2\n* Remove extra check if browsers are listed as plugin in the karma config file\n\n### v2.3.1\n* Fix log output of the browsers used, take possible changes made in the postDetection() function into account\n\n### v2.3.0\n* Split Chrome and Chromium\n* Add support for headless mode in Chrome and Firefox\n* Add check if all browser launchers are installed\n* Preserve browser config for non-detectable browsers like SauceLabs\n\n### v2.2.6\n* Fix problem with stating multiple Firefox instances in Linux\n\n### v2.2.5\n* Update edge launcher binary path\n\n### v2.2.4\n* Update Edge detection to follow bug fixes in karma-edge-launcher\n\n### v2.2.3\n* Edge.js will always return a browser object\n\n### v2.2.2\n* Fix error with Edge module on unix systems\n\n### v2.2.1\n* Fix for build errors on unix systems\n\n### v2.2.0\n* Add support for detecting Microsoft Edge browser\n\n### v2.1.0\n* Add support for detecting Safari Tech Preview\n\n### v2.0.1\n* Add some executables names for the Chrome browser in Linux\n\n### v2.0.0\n* Drop peerDependencies so that the user has full control which karma browser plugins are installed via npm\n* This is a breaking change since now you have to manually add the karma browser plugins to the `package.json` file of your project\n\n### v1.1.2\n* Revert peerDependencies changes, since this would be a breaking change. Waiting for npm v3 final.\n\n### v1.1.1\n* Move peerDependencies to dependencies in preparation of npm v3+\n\n### v1.1.0\n* Use karma's logger instead of console.log to respect the log level set in the karma config file\n\n### v1.0.0\n* PhantomJS was not used when there are no browsers installed in the system\n\n### v0.1.3\n* add new parameter (postDetection) to post process browser list\n\n### v0.1.2\n* add support for phantomjs, is enabled by default, can be disabled\n\n### v0.1.1\n* only override browsers in config when a browser was found by the plugin\n\n### v0.1.0\n* first release\n\n## Author\n[Litixsoft GmbH](http://www.litixsoft.de)\n\n## License\nCopyright (C) 2013-2018 Litixsoft GmbH \u003cinfo@litixsoft.de\u003e\nLicensed under the MIT license.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included i\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitixsoft%2Fkarma-detect-browsers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitixsoft%2Fkarma-detect-browsers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitixsoft%2Fkarma-detect-browsers/lists"}