Permalink
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (75 sloc) 3.84 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Coverate Results</title>
<style>
.error { background: #F8D5D8 }
.count { font-weight: bold; border-radius: 3px }
.pass .count { background: #BFFFBF;} .error .count { background: #F8D5D8; color: red}</style>
</head>
<body>
<h1>test/fixture.js (70%)</h1>
<pre><span class="pass" data-count="1"><span class="count">1</span>"use strict";</span>
<span class="pass" data-count="1"><span class="count">1</span>var a = 1;</span>
<span class="pass" data-count="1"><span class="count">1</span>var b = 3;</span>
<span class="pass" data-count="1"><span class="count">1</span>var esprima = require('esprima');</span>
<span class="pass" data-count="1"><span class="count">1</span>var escodegen = require('escodegen');</span>
<span class="pass" data-count="1"><span class="count">1</span>function c(a, b){
<span class="pass" data-count="3"><span class="count">3</span>return a + b;</span>
}</span>
<span class="pass" data-count="1"><span class="count">1</span>if (b){
<span class="pass" data-count="1"><span class="count">1</span>a++;</span>
} else {
<span class="error" data-count="0"><span class="count">0</span>b--;</span>
}</span>
<span class="pass" data-count="1"><span class="count">1</span>var d = function(){
<span class="error" data-count="0"><span class="count">0</span>console.warn('bar');</span>
};</span>
<span class="pass" data-count="1"><span class="count">1</span>switch (a){
case 1:
<span class="error" data-count="0"><span class="count">0</span>c(a, b);</span>
<span class="error" data-count="0"><span class="count">0</span>c(a, c(a, b));</span>
<span class="error" data-count="0"><span class="count">0</span>break;</span>
case 2: <span class="pass" data-count="1"><span class="count">1</span>c(b, a);</span> <span class="pass" data-count="1"><span class="count">1</span>break;</span>
}</span>
<span class="pass" data-count="1"><span class="count">1</span>c(3, 4);</span>
<span class="pass" data-count="1"><span class="count">1</span>c(5, 2);</span>
<span class="pass" data-count="1"><span class="count">1</span>function Cover(){
}</span>
<span class="pass" data-count="1"><span class="count">1</span>Cover.prototype = {
parse: function(){
<span class="error" data-count="0"><span class="count">0</span>return (this.ast = esprima.parse(this.code, {
range: true
}));</span>
},
generate: function(ast){
<span class="error" data-count="0"><span class="count">0</span>return escodegen.generate(ast);</span>
},
walk: function(ast, index, parent){
<span class="error" data-count="0"><span class="count">0</span>console.warn('foo bar');</span>
<span class="error" data-count="0"><span class="count">0</span>console.warn('yello');</span>
}
};</span>
<span class="pass" data-count="1"><span class="count">1</span>try {
<span class="pass" data-count="1"><span class="count">1</span>throw new Error('whops');</span>
<span class="error" data-count="0"><span class="count">0</span>console.warn('not here!');</span>
} catch (e){
<span class="pass" data-count="1"><span class="count">1</span>console.warn(e);</span>
<span class="pass" data-count="1"><span class="count">1</span>console.warn(e);</span>
} finally {
<span class="pass" data-count="1"><span class="count">1</span>console.warn('finally');</span> <span class="pass" data-count="1"><span class="count">1</span>console.warn('more finally');</span>
}</span>
</pre><h1>test/fixture2.js (100%)</h1>
<pre>
<span class="pass" data-count="1"><span class="count">1</span>var a;</span>
<span class="pass" data-count="1"><span class="count">1</span>for (var i = 200; i--;){
<span class="pass" data-count="200"><span class="count">200</span>if (i > 150){
<span class="pass" data-count="49"><span class="count">49</span>a = i;</span>
} else {
<span class="pass" data-count="151"><span class="count">151</span>a = 200 - i;</span>
}</span>
}</span>
</pre>
</body>
</html>