jcov 1.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/features/instrumentation.feature +17 -0
- data/lib/jcov/version.rb +1 -1
- data/vendor/acorn.js +11 -3
- metadata +2 -2
@@ -308,3 +308,20 @@ Feature: instrumentation
|
|
308
308
|
_coverage_tick('public/javascripts/foo.js', 2);bar();
|
309
309
|
}
|
310
310
|
"""
|
311
|
+
|
312
|
+
Scenario: it does the right thing with "use strict";
|
313
|
+
Given a file named "public/javascripts/foo.js" with:
|
314
|
+
"""
|
315
|
+
"use strict";
|
316
|
+
|
317
|
+
var foo = 1;
|
318
|
+
var bar = 2;
|
319
|
+
"""
|
320
|
+
When I run `jcov --dump`
|
321
|
+
Then the output should contain:
|
322
|
+
"""
|
323
|
+
_coverage_tick('public/javascripts/foo.js', 1);"use strict";
|
324
|
+
|
325
|
+
_coverage_tick('public/javascripts/foo.js', 3);var foo = 1;
|
326
|
+
_coverage_tick('public/javascripts/foo.js', 4);var bar = 2;
|
327
|
+
"""
|
data/lib/jcov/version.rb
CHANGED
data/vendor/acorn.js
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
// [dammit]: acorn_loose.js
|
21
21
|
// [walk]: util/walk.js
|
22
22
|
|
23
|
-
(function(
|
23
|
+
(function(mod) {
|
24
|
+
if (typeof exports == "object" && typeof module == "object") return mod(exports); // CommonJS
|
25
|
+
if (typeof define == "function" && define.amd) return define(["exports"], mod); // AMD
|
26
|
+
mod(self.acorn || (self.acorn = {})); // Plain browser env
|
27
|
+
})(function(exports) {
|
24
28
|
"use strict";
|
25
29
|
|
26
30
|
exports.version = "0.1.01";
|
@@ -822,7 +826,7 @@
|
|
822
826
|
case 85: out += String.fromCharCode(readHexChar(8)); break; // 'U'
|
823
827
|
case 116: out += "\t"; break; // 't' -> '\t'
|
824
828
|
case 98: out += "\b"; break; // 'b' -> '\b'
|
825
|
-
case 118: out += "\
|
829
|
+
case 118: out += "\u000b"; break; // 'v' -> '\u000b'
|
826
830
|
case 102: out += "\f"; break; // 'f' -> '\f'
|
827
831
|
case 48: out += "\0"; break; // 0 -> '\0'
|
828
832
|
case 13: if (input.charCodeAt(tokPos) === 10) ++tokPos; // '\r\n'
|
@@ -941,6 +945,10 @@
|
|
941
945
|
function setStrict(strct) {
|
942
946
|
strict = strct;
|
943
947
|
tokPos = lastEnd;
|
948
|
+
while (tokPos < tokLineStart) {
|
949
|
+
tokLineStart = input.lastIndexOf("\n", tokLineStart - 2) + 1;
|
950
|
+
--tokCurLine;
|
951
|
+
}
|
944
952
|
skipSpace();
|
945
953
|
readToken();
|
946
954
|
}
|
@@ -1708,4 +1716,4 @@
|
|
1708
1716
|
return finishNode(node, "Identifier");
|
1709
1717
|
}
|
1710
1718
|
|
1711
|
-
})
|
1719
|
+
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|