Questions tagged [karma-chrome-launcher]
22 questions
5
votes
2 answers
angular unit tests - start Chrome after successful build (taking long time)
On some machines building the Angular app takes more then 2*60s (default timeout for Chrome started by Karma to catch the content).
Is there a way to force Karma to start Chrome after build is finished?
My package.json:
{
"dependencies": {
…

koral
- 2,807
- 3
- 37
- 65
4
votes
2 answers
How do I debug errors from karma-server?
I'm using karma along with karma-typescript (but this isn't an Angular project, so I'm not using angular-cli).
About half of my test runs generate an error after all of the tests have passed, and I'm stumped as to how to proceed. Here's the…

fr0
- 1,048
- 2
- 9
- 16
4
votes
0 answers
Running angular unit test in docker - Cannot load browser RangeError: Maximum call stack size exceeded
I am having an issue running unit tests for an angular project inside a docker container. I've gone through everything I can think of but cant seem to find the issue. These tests run fine outside of docker using the same commands.
I am using…

fotg
- 639
- 1
- 12
- 25
3
votes
1 answer
Converting newly created angular cli project to use mocha framework instead of jasmine
Hey i created a new project with latest angular cli. It creates a project that uses jasmine as the testing framework. I wanted to use mocha.
I added the required plugins following the project…

Kartik
- 51
- 1
- 5
3
votes
1 answer
Angular 5: Karma Unit testing fails to start HeadlessChrome on CI environment
We're facing issues on our CI environment (Jenkins within a Docker build pod on Openshift).
Error: Failed to adjust OOM score of renderer with pid 261: Permission denied (13)
Here some additionalinfos:
Docker based build pod is running based on…

Weso
- 408
- 4
- 14
3
votes
0 answers
Karma, Mocha, Chrome Headless and click testing on an url
I'm trying to use Karma & Chrome Headless to replace testing I would have done with CasperJS & PhantomJS to load a public site for running end to end click testing.
The idea is that this would be an automated test against a canary server to ensure…

Ali
- 49
- 6
2
votes
0 answers
Unit Tests not running after Chrome 83 Update
I updated Chrome from 81 to 83. Prior to that update all of my Karma unit tests were passing successfully. Now, my HeadlessChrome unit tests are failing because Chrome never connects. Has anyone ran into this issue?
I am currently on a Windows 10…

Hank Metzger
- 33
- 3
2
votes
1 answer
Error: Timeout - Async function did not complete within undefinedms
I recently upgraded an Angular 8 application to use newer version of Karma and related packages (upgraded from "karma": "~4.0.0" to "karma": "~4.4.1"). Many unit tests that worked fine before started to fail intermittently after the upgrade with the…

Atif Majeed
- 1,021
- 17
- 14
2
votes
2 answers
Problem to capture ChromeHeadless launcher Using Puppeteer
can someone help me in this issue?
I am getting the '[launcher]: ChromeHeadless have not captured in 60000 ms, killing.' when the pipeline (Jenkins) is trying to exec the tests with karma (Puppeteer using ChromeHeadless)
We have as demmand of the…

Renato Oliveira
- 41
- 1
- 6
2
votes
0 answers
An error was thrown in afterAll - during webcomponent test with Karma
I have a very simple webcomponent and I want to test it. I am getting the error mentioned in this question topic. I found a bit similar question Jasmine Karma Error "An error was thrown in afterAll\nUncaught ReferenceError: container is not defined…

Jim C
- 3,957
- 25
- 85
- 162
2
votes
1 answer
Karma Chrome tests failing in Chrome, but passing in PhantomJS
I'm trying to run tests in Chrome browser using Karma. I've been running them in PhantomJS without any issue, but was hoping to switch to ChromeHeadless. I discovered that tests aren't passing in Chrome or ChromeHeadless, but still pass using…

xveganxxxedgex
- 158
- 10
1
vote
0 answers
Angular Unit Test with puppeteer opens a command line window, breaks debugger
On an Angular project we use Puppeteer to include a Headless Chrome binary on dependency installation, it helps on a lot of things, including CI. The way to do this is described Here
It always worked fine but since last Chromium binary version bump…

jsanvi22
- 11
- 2
1
vote
2 answers
Set default launcher flags when I run ng test without additional arguments
I need to pass custom argument to chrome in order to set locale: --lang en-US
I've done it using customLauncher. My src/karma.conf.js:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine',…

Liero
- 25,216
- 29
- 151
- 297
1
vote
1 answer
How to run Karma with Chrome on TravisCI (Ubuntu 16.04/Xenial)?
My tests recently started failing on TravisCI because Google apparently dropped support for Ubuntu 14.04 (Trusty) with the latest release of Chrome. I've upgraded to Ubuntu 16.04 (Xenial) but am now unable to get Karma to connect to Chrome:
11 09…

ericgio
- 3,094
- 4
- 25
- 44
1
vote
0 answers
Karma - Jasmine Disconnected timeout
I have write the test cases using Karma and Jasmine. Test cases can't execute the below error is thrown.
Karma.js
module.exports = function(config) {
config.set({
browserDisconnectTimeout: 20000,
browserDisconnectTolerance: 0,
…

viji
- 48
- 1
- 4