I'm using Karma-Webpack to run my Angular 2 specs.
https://github.com/webpack/karma-webpack
When I execute tests using karma in Chrome, the source files for my specs appear readable in the debugger. However, the system under test files (my…
After the recent releases of webpack 1.14.0 / karma 1.4.0 / karma-webpack 2.2.0, that I now see a lot of these messages when karma starts its webpack build.
webpack: wait until bundle finished:
Sometimes I see as many as 6-8 of them and they seem…
I am using angular-cli and I want to use two karma.conf.js files for testing.
For CI : For which I am using Headless Chrome
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: [
'--headless',
'--disable-gpu',
//…
I recently updated from Angular9 to Angular 12. After the update my tests have started "failing". I have quotes around that because the tests themselves seems to be fine, however after every run there is an "Error" entry that is not very…
I have some test files with tests I'd like to run against my app.
I am attempting to use karma, karma-webpack, karma-babel-preprocessor, karma-chrome-launcher, and jasmine in my testing. My app depends on many things, including backbone,…
I would like to know how to implement unit form tests with karma.
I've implemented a test but it always gives the following error: Error: No value accessor for form control with name: 'email'
signup.module.ts
import { NgModule } from…
I am tring to run test of angular using npm
ng test
but the problem is that chrome start and not stop after test finish so I used :
ng test --watch=false
but that cause error "Chrome 69.0.3497 (Linux 0.0.0) ERROR"
which make chrome timeout
I am…
I tried to use Angular TestBed as described on angular.io website to test a simple component, but I get errors like: TypeError: undefined is not an object (evaluating 'ProxyZoneSpec.assertPresent') and 404 as it cannot load the external component…
I'm using Typescript to create some web components with Lit element.
Webpack to bundle and unit tests with karma.
I've noticed that the coverage report is all out:
showing uncovered branches and statements on decorators
coverage for lines following…
I am using Karma with the karma-webpack plugin for bundling and transpiling with babel. When a test has an error, I get a nice message with a line number for the bundle, like the following:
Service: DocumentService
✗ gets the correct number of…
I'm trying to set up a build process for TypeScript using Webpack. Everything's working fine for most parts. However I can't get source-maps to work properly in the Karma test runner.
Problem description
Let's say I have a typescript file…
When running tests with code coverage through angular-cli (ng test -cc), karma throw the error below. The culprit seems to be the istanbul code coverage module as running the tests without -cc does not result in any errors.
Error (I've replaced…
I recently started the move from a custom gulp script that used to take care of all sorts of stuff to webpack. I have it working to a point where transpiling, bundling and serving the client app in the browser works great.
Now, when I was using…
I am trying to mock Fetch in Jasmine/Karma test using fetch-mock
But it is not working, seems that fetch-mock does not mock the request.
I tried to set up the polyfill codes, but the result is the same.
Is there something we have to set up before…
Repo with an example: https://github.com/OriolInvernonLlaneza/karma-webpack-error-example
I had Karma + Jasmine tests running correctly with Angular 11 and Webpack 4. However, when trying to update Angular and Webpack to v12 and v5, I'm getting…