Karma - Chrome failed 2 times (cannot start). Giving up

I've been trying to run my tests using karma-chrome-launcher, but everytime I run my tests it throws this error: INFO [launcher]: Starting browser Chrome ERROR [launcher]: Cannot start...

Uncaught ReferenceError: require is not defined at node_modules/karma-chrome-launcher/test/jsflags.spec.js:3

When I run karma start I'm getting the following error: > Chrome 68.0.3440 (Windows 10.0.0) ERROR Uncaught ReferenceError: require is not defined at...

How to launch karma Chrome in background

I want to run karma chrome launcher in background because i am generating html tests and coverage reports which means i don't need a visual browser appearing everytime i run a test. Here is my...

npm install karma script launcher error

I don't know what the problem can be. I deleted my node_modules folder first and I'm trying to do an npm install from scratch. I keep getting the following error when I try to do a clean npm...

karma + Chrome not working after last auto-update of Chrome

We use jenkins with a number of jenkins slave nodes running on Windows 7. Through jenkins we kick off karma tests to be run on the slave node to run our jasmine tests on the actual browsers....

Karma fails when using PhantomJS but not Chrome

I have a series of tests that are pass when I use the Karma Chrome Launcher but fail when I use the Karma PhantomJS launcher. Here is my what's inside my karma.config.js file ``` frameworks:...

karma-init fails on Windows 10 with Node.js 7.1.0 x64

After installing succesfully the following node packages: karma karma-jasmine karma-chrome-launcher jasmine-core I get the following error when executing...

How to get Karma to work with Chrome

I have a command-line-only Ubuntu 11.04 (GNU/Linux 2.6.35.4-rscloud x86_64) and I'm working through the Angular Phonecat tutorial which uses the Karma for testing. The Karma browser config page...

"Karma init" not initializing config file

I have installed karma-cli -g,karma -g,karma-jasmine -dev,karma-chrome-launcher -dev. I have set all the required path variable. "npm list karma" also returning proper version. Still init not...

How to configure Karma

Here is my root directory src/tsfolders/.ts files public/src/jsfolders/.js files. And Karma config module.exports = function(config) { config.set({ basePath: '.', frameworks:...

Karma with Chrome - Unknown policy: PasswordManagerAllowShowPasswords

I get the following error when Karma launches Chrome. Also, this only happens on Windows; works fine on Linux. [4804:10108:0921/102208.538:ERROR:configuration_policy_handler_list.cc(92)] Unknown...

Npm installing Karma-jasmine doesn't work

I just follow the instructions in there: http://karma-runner.github.io/0.12/intro/installation.html Karma has been installed correctly. Though, I can't install karma-jasmine and...

karma chrome not loading.its giving up after two attempts

I'm integrating Jasmine and karma for unit testing my ionic app. I'm following this blog. When i run the karma start command i keep getting this result. 23 02 2017 16:39:18.508:WARN [karma]: No...

How to add the chrome binary to run e.g. Karma tests on headless chrome on a CI server

I like to run my karma unit tests on a headless chrome. Using karma-chrome-launcher and setting the browser to "ChromeHeadless" works on my machine. But on the CI server it fails with the message...

Karma cannot connect to Chrome in Windows 7

karma start Launches Chrome with correct URL but Chrome just sits there and spins. Also, no other url will work in that window that Karma launched. Same behavior with Canary Similar issue with...

Karma debug headless chrome

I'm trying to debug a problem that happens only with headless chrome. I'm using karma-chrome-launcher with a config that looks in part like this: ``` process.env.CHROME_BIN =...

Uncaught ReferenceError: jasmineRequire is not defined

I'm having a problem with my test, when I run them I'm getting this error: 09 09 2015 14:55:27.174:INFO [Chrome 45.0.2454 (Mac OS X 10.10.1)]: Connected on socket 9aXAoBK8a1zKw9IVAAAA with id...

How to test e2e google chrome extension with karma?

I've found fantastic unit/e2e test tools karma. And I wrote simple chrome extension with angular. I want to write automated tests for it, but not only unit tests, end-to-end tests too. I wrote...

Tests fail after karma upgrade from 0.12 to 0.13

My karma scripts stops working when I upgrade the following dependencies grunt-karma 0.11.0 → 0.12.0 karma-jasmine 0.3.5 → 0.3.6 karma 0.12.35 → 0.13.9 The...

jasmine matcher functions not loading in angularjs/karma unit tests

I'm writing unit tests for an angularJs app, I'm using the karma test runner with the jasmine framework. I'm testing a function that should pull objects from firebase, I've installed the...

Not able to run Karma/Jasmine Tests on Bamboo CI

Thanks in advance for looking into it. We are facing an issue with running our unit tests on Bamboo CI. We are using Karma-Chrome-Launcher (Have some issues with downloading PhantomJS in our...

Karma : Not able to launch browser using karma-webdriver-launcher

Tried Karma with karma-webdriver-launcher && karma-selenium-grid-launcher to launch chrome/firefox to execute tests but not able to open browser Can someone please share working code for e2e test...

Karma debugging in Chrome no longer working

We are working on an Angular project where we are using Karma/Jasmine for our testing environment. We've been using the karma-chrome-launcher for debugging the tests and it was working great. For...

configuration of karma/jasmine to test angularjs throws: No provider for "framework:jasmine"!

Hello I'm trying to implement unit-tests for angularjs with karma and jasmine. I followed therefore this tutorial: http://tech.pro/tutorial/1473/getting-started-with-angularjs-unit-testing On the...

Exclude ES6 Imports from Istanbul Code Coverage Reports

"Is there a way to exclude ES6 imports from Istanbul code coverage reports? This is a snapshot of a sample report generated. snapshot Using the following setup: "istanbul-instrumenter-loader":...

Karma: use Windows' Chrome from WSL

I am trying to launch karma from WSL using the Windows version of Google Chrome. In the karma.conf.js I simply use the Chrome browser: [...], browsers: ['Chrome'], [...] And I export the...

Karma will not run headless for ng test

Using Angular CLI: 1.6.6 and Angular 5, I can not get my unit tests to run on a headless Ubuntu server. I keep getting: 20 03 2018 16:51:19.719:WARN [karma]: No captured browser, open...

Error: In Angular CLI >6.0 the Karma plugin is now exported by "@angular-devkit/build-angular" instead

Error: In Angular CLI >6.0 the Karma plugin is now exported by "@angular-devkit/build-angular" instead i am getting this error // Karma configuration file, see link for more information //...

How to configure Angular2 Quickstart to run phantomjs?

I am trying to figure out how to run the tests of Angular2 Quickstart with phantomjs. I thought these steps were enough to configure Karma: 1. Clone the repository $ git clone...

Uncaught TypeError: Cannot read property 'teams' of undefined thrown - Karma

I'm running into this issues when I'm running ng test. It compiles fine, and ng build --prod runs fine. I don't even see those variables with that name just the Observables but the have a $...