Fix tests on node 4
Turns out, if you don't put "use strict"; `const` behaves in a crazy way.
This commit is contained in:
1 parent
1d02ca7849
commit
c9d2c17bc7
1 file changed
+4
-2
+4
-2
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("assert");
|
||||
var types = require("ast-types");
|
||||
var n = types.namedTypes;
|
||||
@@ -456,11 +458,11 @@ function printComment(commentPath) {
|
||||
}
|
||||
|
||||
function findExpressionIndexForComment(expressions, comment) {
|
||||
var match;
|
||||
let match;
|
||||
const startPos = locStart(comment) - 1;
|
||||
const endPos = locEnd(comment) + 1;
|
||||
|
||||
for (var i = 0; i < expressions.length; ++i) {
|
||||
for (let i = 0; i < expressions.length; ++i) {
|
||||
const range = getExpressionRange(expressions[i])
|
||||
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user