红联Linux门户
Linux帮助

jQuery模拟测试框架 jqMock

发布时间:2012-09-18 11:01:37来源:红联作者:empast
jqMock 是一个轻量级的 JavaScript 模拟测试框架,基于 jqUnit 单元测试框架。

模拟测试代码:[code]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();
});[/code]主页:http://code.google.com/p/jqmock/

下载:http://code.google.com/p/jqmock/downloads/list

来自:开源中国社区
文章评论

共有 0 条评论