Pavol Kögler
1 min readJul 2, 2020

--

Hi, this approach will not work for anonymous functions. Regarding arrow functions that have some names it should be up to your implementation. As I wrote in the article, the functions are looked up by the regex -> so putting correct regexes to catch your function declarations should do the trick. For me I was using it to test one process that included about 50 functions. It was easier for me to change declarations if they did not match my lookup regex than implementing regexes for all nuances that are in JS regarding function declaration :)

--

--

Pavol Kögler
Pavol Kögler

Written by Pavol Kögler

Fullstack developer and JavaScript enthusiast

Responses (1)