• Skip to main content
  • Skip to primary sidebar

Ryan McCormick

SOLVED: Angular 6 CLI Karma Stuck in Single Run | Karma Stops Running

May 3, 2018 by Ryan 2 Comments

Angular 6 was released only a few hours ago and I was eager to start working with it. As I was working through some of the many features, I found that the test runner exits after a single test run despite the settings explicitly setting defaults (autoWatch: true, singleRun: false). I have already logged this issue with the CLI team on Github but wanted to share my workaround.

Karma autoWatch Workaround

By adding --watch after the ng test in the package.json file (looks like `ng test –watch`) and running `npm run test` from the command line, I was able to make the runner stay in watch mode. This can also be accomplished by running `ng test –watch` from the command line as well.

That is all I have for today, happy coding!

Filed Under: Angular Tagged With: angular, angular 6, angular cli, chrome, karma

Reader Interactions

Comments

  1. AlexVarChar says

    May 7, 2018 at 1:01 pm

    Thanks Ryan it worked.

    Reply
  2. beartums says

    May 10, 2018 at 12:09 am

    Thanks Ryan. That’s a big help!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Force Quit Kill all Chrome Windows MacOS
  • SOLVED: Angular 6 CLI Karma Stuck in Single Run | Karma Stops Running
  • How to Manually Install Java 8 on Ubuntu 18.04 LTS
  • Remove VirtualBox from Ubuntu 16.04 Xenial
  • Clear all Node Modules Folders Recursively Mac/Linux

Recent Comments

  1. KKV on Webstorm adding spaces between imports and braces | JavaScript and TypeScript
  2. jusopi on Clear all Node Modules Folders Recursively Mac/Linux
  3. Qaisar Irfan on Clear all Node Modules Folders Recursively Mac/Linux
  4. mustafa on Remove VirtualBox from Ubuntu 16.04 Xenial
  5. Pourya on How to Manually Install Java 8 on Ubuntu 18.04 LTS

Copyright © 2025 · Magazine Pro on Genesis Framework · WordPress · Log in