- 授权协议: LGPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://code.google.com/p/jqmock/
- 软件文档: http://jqmock.googlecode.com/svn/trunk/docs/userguide.html
软件介绍
jqMock 是一个轻量级的 JavaScript 模拟测试框架,基于 jqUnit 单元测试框架。
模拟测试代码:
jqUnit.test('hello world test', function() {
var alertMock = new jqMock.Mock(window, 'alert');
alertMock.modify().args('hello world!').multiplicity(2).returnValue();
hello();
hello();
alertMock.verify();
alertMock.restore();
});
