Every Angular CLI generated project comes already with Karmapreinstalled as well a couple of executable Jasmine specs. The default test reporter is "progress" which simply logs out the number of passed and failed tests. In this lesson we learn how to add the Karma Mocha test reporter to our Angular CLI setup.

Install:

npm i -D karma-mocha-reporter

Add to karma.config.js:

plugins: [
..
require('karma-mocha-reporter'),
..
] .. reporters: [
'mocha', 'kjhtml'
]

Now the reporter will be more frinedly to read

[Unit Testing] Configure the Angular CLI to use the Karma Mocha test reporter的更多相关文章

  1. [Angular 8] Calculate and Measure Performance budgets with the Angular CLI

    Measuring is extremely important, without numbers we don’t know about potential problems and we don’ ...

  2. Configure a proxy for your API calls with Angular CLI

    Table of contents Local development setup with Angular Issue: Dev server plus backend API Configurin ...

  3. [Angular] Configure an Angular App at Compile Time with the Angular CLI

    Compile time configuration options allow you to provide different kind of settings based on the envi ...

  4. [Unit Testing] AngularJS Unit Testing - Karma

    Install Karam: npm install -g karma npm install -g karma-cli Init Karam: karma init First test: 1. A ...

  5. C/C++ unit testing tools (39 found)---reference

    http://www.opensourcetesting.org/unit_c.php API Sanity AutoTest Description: An automatic generator ...

  6. Unit testing Cmockery 简单使用

    /********************************************************************** * Unit testing Cmockery 简单使用 ...

  7. Unit Testing a zend-mvc application

    Unit Testing a zend-mvc application A solid unit test suite is essential for ongoing development in ...

  8. .Net Core + Angular Cli / Angular4 开发环境搭建

    一.基础环境配置 1.安装VS 2017 v15.3或以上版本 2.安装VS Code最新版本 3.安装Node.js v6.9以上版本 4.重置全局npm源,修正为 淘宝的 NPM 镜像: npm  ...

  9. [转]How to Add Bootstrap to an Angular CLI project

    本文转自:https://loiane.com/2017/08/how-to-add-bootstrap-to-an-angular-cli-project/ In this article we w ...

随机推荐

  1. [Windows Server]新机子上装老系统·

    硬盘模式改了也得用U大师,然后再PE里装 1.U大师做启动盘 2.拷贝解压后的系统进去 3.用PE自带安装工具

  2. Mysql第四天 数据库设计

    不考虑主备.集群等方案,基于业务上的设计主要是表结构及表间关系的设计. 而关于表中字段主要是依据业务来进行定义,我们能够指定的大概有这么几项: 存储引擎 一般用InnoDB,特殊需求特殊选用 字符集和 ...

  3. java 递归实现删除或查询指定目录下的全部文件

    /** * 递归列举盘符下的全部文件的名称,如E:\HeartIsland * * @author HeartIsland * */ public class FileListDemo { /** * ...

  4. 关于部门后端所有转向java前初步设想

    Java服务有些什么形式?眼下来看主要是下面几类: 1.  执行在Web应用server的Servlet 2.  Thrift.PB.Avro等相似框架写的java服务 3.  WebService( ...

  5. [C#] 怎样分析stackoverflow等clr错误

    有时候由于无限递归调用等代码错误,w3wp.exe会报错退出.原因是clr.exe出错了. 这样的错误比較难分析,由于C#代码抓不住StackOverflowException等异常. 处理方法是:生 ...

  6. git在win7下安装的问题

    本帖最后由 ikscher 于 2015-07-30 20:24:16 编辑 从官网下载的最新版本号git-1.9.2-preview版本号,安装在还有一台win7下没有此错误,可是安装在当中一台出现 ...

  7. elcipse 编译cocos2d-x android

    http://blog.csdn.net/eyu8874521/article/details/22605695 最開始学习cocos2dx.大多数人可能是被复杂的环境配置过程搞死的,尤其是和Andr ...

  8. 我的Android进阶之旅------>android Button上面的英文字符串自己主动大写的问题解决

    今天碰到一个关于Button的问题:android Button上面的英文字符串会自己主动变成大写,执行的Android 5.1版本号,例如以下图所看到的: 图1:Button 图2:TextView ...

  9. 英语发音规则---X字母

    英语发音规则---X字母 一.总结 一句话总结: 1.x位于词尾或音节尾部,读/ks/? box /bɒks/ n.盒; 箱状物 fix /fɪks/ vt.固定 fox /fɒks/ n.狐; 狐狸 ...

  10. js 回调函数小例子

    js 回调函数小例子 <script> //将函数作为另一个函数的参数 function test1(){ alert("我是test1"); } function t ...