Closed mishoo closed 6 years ago
Thanks for the PR!
Could you add a few regression tests as well?
I tried back when I submitted the PR, something failed (can't remember exactly what) and I gave up. In any case, we depend on a fix in js2-mode — without that, a proper test would fail anyway.
I'll try adding some tests if/after my PR into js2-mode gets merged.
EDIT: it's been merged. I'll try again to write the tests tomorrow.
I added some tests.
Fixes a few more cases where
js2r-rename-var
could fail to detect the symbol (see comments). One of them depends on a fix in js2-mode though (detecting the symbol in{ name }
, without that fixjs2-node-at-point
will return a name node only if the cursor is on then
).