JavaScript test framework : Mocha
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on GitHub.
https://mochajs.org/#reporters
INSTALLATION
Install with npm globally:
$ npm install --global mocha
or as a development dependency for your project:
$ npm install --save-dev mocha
Mocha currently requires Node.js v6.x or newer.
GETTING STARTED
$ npm install mocha
$ mkdir test
$ $EDITOR test/test.js # or open with your favorite editor
In your editor:
var assert = require('assert');
describe('Array', function() {
describe('#indexOf()', function() {
it('should return -1 when the value is not present', function() {
assert.equal([1,2,3].indexOf(4), -1);
});
});
});
关注公众号
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
-
上一篇
checkbox获取多选框,创建本地存储
2017年11月17日 checkbox获取多选框,创建本地存储 //本地存储对象和数组都需要转JSON字符串JSON.stringify var disease = []; $('input[name="operation"]:checked').each(function(){ disease.push($(this).val()); }); localStorage.setItem('oper',JSON.stringify(disease));
-
下一篇
12.标准标签库(JSTL)
1.JSTL标签库安装 JSTL的概念: JSP标准标签库(JSP Standard Tag Library)是一个实现 Web 应用程序中常见的通用功能的定制标记库集功能包括迭代和条件判断、数据管理格式化、XML 操作以及数据库访问JSTL标签库由几个子标签库组成,主要分为以下几种:核心标签、XML标签、格式化标签(I18N)、SQL标签、函数标签库。 JSTL的安装: 将jstl.jar、standard.jar放在WEB-INF/lib目录下jstl.jar提供了标签开发接口类standard.jar 提供了标签库的实现类在JSP中使用taglib伪指令导入JSTL标签库<%@taglib prefix=“c” uri=“http://java.sun.com/jstl/core”%>导入JSTL核心标签库通过<c:XXX>可以使用JSTL核心标签库标签 标签库集: JSTL 前置名 URI 示例 核心 标签库 c http://java.sun.com/jsp/jstl/core <c:out> I18N格式标签库 fmt htt...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- SpringBoot2整合Thymeleaf,官方推荐html解决方案
- SpringBoot2初体验,简单认识spring boot2并且搭建基础工程
- Docker使用Oracle官方镜像安装(12C,18C,19C)
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- 设置Eclipse缩进为4个空格,增强代码规范
- Crontab安装和使用
- MySQL8.0.19开启GTID主从同步CentOS8
- CentOS6,CentOS7官方镜像安装Oracle11G
- CentOS6,7,8上安装Nginx,支持https2.0的开启

微信收款码
支付宝收款码