diff --git a/package-lock.json b/package-lock.json index aab22da..b47aeb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -172,9 +172,9 @@ "dev": true }, "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" }, "acorn-jsx": { "version": "5.0.2", diff --git a/package.json b/package.json index 6dee634..0efe723 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "tap": "^14.6.1" }, "dependencies": { - "acorn": "5.7.1", + "acorn": "5.7.4", "debug": "^4.1.1", "needle": "^2.4.0", "semver": "^6.3.0", diff --git a/test/method-detection.test.js b/test/method-detection.test.js index 3f71b40..b84d77b 100644 --- a/test/method-detection.test.js +++ b/test/method-detection.test.js @@ -27,7 +27,9 @@ test('test bootstrap +function method detection', function (t) { test('test clashing variable/function declaration', function (t) { const contents = ` var foo; -function foo() { +{ + function foo() { + } } `; const methods = ['foo']; @@ -35,7 +37,7 @@ function foo() { contents, methods, ); t.same(sorted(Object.keys(found)), sorted(methods)); - t.equal(found[methods[0]].start.line, 3, 'foo'); + t.equal(found[methods[0]].start.line, 4, 'foo'); t.end(); });