karma note
karma
简介
karma不是一个测试框架,仅仅是启动了一个httpServer
karma仅仅是一个跑测试的平台(runner), 我们可以使用各种测试框架, 如:
- Jasmine
- Mocha
- Qunit
安装
karma在 node.js 环境运行,推荐的安装方式是本地安装,如:
npm install karma --save-dev
#安装其他插件
npm install karma-jasmine karma-chrome-launcher --save-dev
#安装命令行界面 可以随时调用karma
npm install -g karma-cli
配置
通过配置文件 如:my.conf.js进行配置, 类似 npm init ,karma也有问答式配置生成命令 karma init yourconf.js
karma init yourconf.coffee karma也支持用coffeeScript写的配置文件
运行
#指定配置文件 启动karma
karma start youconf.js
#不指定配置文件 则默认搜索 karma.conf.js , karma.conf.coffee
karma start
#通过命令行参数 覆盖配置文件相同参数
karma start youconf.js --log-level debug --single-run
#查看帮助
karma start --help
问题
提示: can not load 'coverage', it is not registered , 需要全局安装 npm install -g karma-coverage
集成到grunt/gulp
karma note的更多相关文章
- Karma - MVC Framework for Unity3D
Karma is an MVC framework for Unity3D. Because of how Unity is structured, it actually turns out to ...
- 前端单元测试环境搭建 Karma Jasmine
Karma 官网On the AngularJS team, we rely on testing and we always seek better tools to make our life e ...
- 三星Note 7停产,原来是吃了流程的亏
三星Note 7发售两个月即成为全球噩梦,从首炸到传言停产仅仅47天.所谓"屋漏偏逢连天雨",相比华为.小米等品牌对其全球市场的挤压.侵蚀,Galaxy Note 7爆炸事件这场连 ...
- 《Note --- Unreal --- MemPro (CONTINUE... ...)》
Mem pro 是一个主要集成内存泄露检测的工具,其具有自身的源码和GUI,在GUI中利用"Launch" button进行加载自己待检测的application,目前支持的平台为 ...
- 《Note --- Unreal 4 --- Sample analyze --- StrategyGame(continue...)》
---------------------------------------------------------------------------------------------------- ...
- [LeetCode] Ransom Note 赎金条
Given an arbitrary ransom note string and another string containing letters from all th ...
- Beginning Scala study note(9) Scala and Java Interoperability
1. Translating Java Classes to Scala Classes Example 1: # a class declaration in Java public class B ...
- Beginning Scala study note(8) Scala Type System
1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the h ...
- Beginning Scala study note(7) Trait
A trait provides code reusability in Scala by encapsulating method and state and then offing possibi ...
随机推荐
- Java Tomcat Glassfish Weblogic远程debug(remote debug)
tomcat ./catalina.sh jpda start 这条命令启动tomcat,它就会监听8000端口,等待调试器的连接. 默认监听8000端口,通过设置环境变量JPDA_ADDRESS指定 ...
- spring学习参考资料
http://www.cnblogs.com/ooooevan/p/5795456.html http://blog.csdn.net/hongjun1847/article/details/2053 ...
- EC读书笔记系列之7:条款12 复制对象时勿忘其每一个成分
记住: ★copying函数应确保复制“对象内的所有成员变量”及“所有base class成分” ★不要尝试以某个copying函数实现另一个copying函数.应该将共同机能放进第三个函数中,并由两 ...
- mysql学习(四)-字段类型
mysql数据类型: 数值型: 整形:int 浮点型:float double decimal:定点型 日期: date '2012-01-02' time '10:01:01' datetime ...
- < meta > 元素 概要
< meta > 元素 概要 标签提供关于HTML文档的元数据.元数据不会显示在页面上,但是对于机器是可读的.它可用于浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他 we ...
- 001.web前端-学习了解
学习web前端开发基础技术需要掌握:HTML.CSS.JavaScript语言.下面我们就来了解下这三门技术都是用来实现什么的: 1.html(Hypertext Markup Language)—— ...
- python基础知识讲解——@classmethod和@staticmethod的作用
python基础知识讲解——@classmethod和@staticmethod的作用 在类的成员函数中,可以添加@classmethod和@staticmethod修饰符,这两者有一定的差异,简单来 ...
- [LeetCode]题解(python):146-LRU Cache
题目来源: https://leetcode.com/problems/lru-cache/ 实现一个LRU缓存.直接上代码. 代码(python): class LRUCache(object): ...
- verilog中=和<=的区别
一般情况下使用<=,组合逻辑使用=赋值,时序逻辑使用<=赋值: 举个例子:初始化m=1,n=2,p=3:分别执行以下语句 1.begin m=n:n=p:p=m: end 2.begin ...
- Generator & Co
Generator 搬运自 http://es6.ruanyifeng.com/#docs/generator 如果没有babel等环境也可以在线体验 可以在http://www.es6fiddle. ...