Questions tagged [karma-coverage]

A plugin for Karma (code test runner) that generate code coverage.

A plugin. Generate code coverage.

295 questions
0
votes
0 answers

Test case fails due to missing parameter from call-back function

I have to write a test-case using karma to the following code. $scope.getUserDetails = function (param) { Api.getData(param).then(function (result) { Api.getVal(result).then(function (data) { var display =…
Kris
  • 219
  • 1
  • 5
  • 12
0
votes
0 answers

Karma tests don't run

I am trying to execute a web app that I developed. The web app is hosted in Weblogic and has the following access URL: http://localhost:7001/webapp/ The problem I have is that the test are not being executed, it is only popping up a Firefox window…
stack man
  • 2,303
  • 9
  • 34
  • 54
0
votes
1 answer

Add karma-coverage to ember test

I have found this really great ember test sample: https://github.com/toranb/ember-testing-example Got it to run, but I can't get the karma-coverage to work and here is the error: ERROR [coverage]: [TypeError: Cannot set property 'covered' of…
Alocus
  • 1,860
  • 3
  • 21
  • 32
0
votes
1 answer

karma-coverage files not created while singleRun = true

I am using Karma to run my unit tests and am now trying to incorporate karma-coverage into my process. I am using PhantomJS to run the tests with singleRun: true. Whenever I do this, my code coverage reporter does not seem to be running. If I set…
gwin003
  • 7,432
  • 5
  • 38
  • 59
-1
votes
0 answers

Karma server crashes with "Disconnected from CONNECTED state (ping timeout)" when running tests in Chrome Headless

I'm encountering a recurring issue while running tests in my Angular project using Karma. The problem occurs specifically when trying to run tests in Chrome Headless mode. The error message I observe in the console is: Chrome Headless…
-1
votes
0 answers

Randomly Test case failing with error [Object object ] thrown or Script error , throne

I have an more than 2000 test cases in my project & whenever i ran all the test cases the randomly test cases failing with below error. Here is my package.json file "devDependencies": { "@angular-devkit/build-angular": "^15.2.8", …
-1
votes
1 answer

Unable to Cover Test Case with both debounce and takeUntil,filter Angular

Here is the code from component that i have written it has simple code to fetch the api data and console here. sample project realtime project Here is the test case i have tried using tick and fakeasync as well still no use.but when i remove…
Krishna Kanth
  • 294
  • 3
  • 10
-1
votes
1 answer

Angular Karma - Can't bind to 'data' since it isn't a known property of 'ngx-item-category-barchart'

When I'm trying to test using karma jsamin, I get this error: Failed: Template parse errors: < Can't bind to 'data' since it isn't a known property of 'ngx-item-category-barchart'. If 'ngx-item-category-barchart' is an Angular component and it has…
sadiquekp
  • 67
  • 1
  • 15
-1
votes
1 answer

angular karma - NullInjectorError: No provider for InjectionToken config

When i'm trying to test it's showing the error.... NullInjectorError: R3InjectorError(DynamicTestModule)[AlertService -> InjectionToken config -> InjectionToken config]: NullInjectorError: No provider for InjectionToken config! This is my…
sadiquekp
  • 67
  • 1
  • 15
-2
votes
1 answer

How to write unit test case using jasmine and karma in angular 7

I have to write unit test case for the below code in a function inside ts file logout() { this.cookieService.delete('deleted_cookie_name'); } I have writtern like this using spy. cookieService=jasmine.createSpyObj(['delete'])
uranus1212
  • 63
  • 1
  • 5
1 2 3
19
20