<!DOCTYPE html>
<html>
<head>
<title>qUnit basic example</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://jqueryjs.googlecode.com/svn-history/r6606/trunk/jquery/test/data/testsuite.css"/>
<script src="http://jqueryjs.googlecode.com/svn-history/r5920/trunk/qunit/testrunner.js"></script>
<script>
test("a basic test example",function(){
ok(true,"This test is fine");
var value="hello";
equals(value,"hello","We expect value to be hello");
});
test("222222222",function(){
ok(true,"This t fine");
var value="hello";
equals(value,"hllo","We eaaaaaaaavalue to be hello");
});
</script>
</head>
<body>
<div id="main"></div>
</body>
</html>
这是我在上面的标记。如果你复制并粘贴它,你将主要测试结果。但是它们是成束的,即它显示了与总假设相比的测试数量的总和。我需要看看断言失败的地方,以及每次测试失败的总成功次数。我怎样才能实现?
答案 0 :(得分:2)
qunit
这样:
main