From 589bc11e9e338e425279f1c968494624812a558b Mon Sep 17 00:00:00 2001 From: gabriel Date: Sun, 23 Apr 2017 14:21:34 +0200 Subject: [PATCH] Increase detective version --- package.json | 2 +- test/fixtures/async-function.js | 23 +++++++++++++++++++++++ test/fixtures/async-function.renamed.js | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/async-function.js create mode 100644 test/fixtures/async-function.renamed.js diff --git a/package.json b/package.json index d67dbb7..ffc861a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "homepage": "https://github.com/thlorenz/rename-function-calls", "dependencies": { - "detective": "~3.1.0" + "detective": "4.x.x" }, "devDependencies": { "tap": "~0.4.3" diff --git a/test/fixtures/async-function.js b/test/fixtures/async-function.js new file mode 100644 index 0000000..6e638f7 --- /dev/null +++ b/test/fixtures/async-function.js @@ -0,0 +1,23 @@ +// { "from": "xxx", "to": "x" } +'use strict'; + +function x() { } +function y() { } +function z() { } + +var go = module.exports = async function () { + xxx(); + y(); + z(); + + function nested() { + return xxx(); + function oneMoreLevel () { + xxx(); z(); xxx(); + } + } + + function nestedExpression() { + return 1 + xxx(); + } +}; diff --git a/test/fixtures/async-function.renamed.js b/test/fixtures/async-function.renamed.js new file mode 100644 index 0000000..af65274 --- /dev/null +++ b/test/fixtures/async-function.renamed.js @@ -0,0 +1,22 @@ +'use strict'; + +function x() { } +function y() { } +function z() { } + +var go = module.exports = async function () { + x(); + y(); + z(); + + function nested() { + return x(); + function oneMoreLevel () { + x(); z(); x(); + } + } + + function nestedExpression() { + return 1 + x(); + } +};