Webstorm unable to detect component methods in test files.

I am using WebStorm for the first time and I have a vue project that is already well written. When we open the test cases, WebStorm does not identify the component methods when they are called by mount or shallowMount using wrapper.vm. For example, if I have wrapper.vm.method() then the error I am getting is Unresolved function or method.

Any help in resolving this issue is much appreciated.


1 comment
Comment actions Permalink

This would require adding special support for wrapper.vm, as the methods are added dynamically in runtime and thus can't be resolved statically

But, for me, methods/data props are resolved (though not suggested by completion - https://youtrack.jetbrains.com/issue/WEB-51228):


Please sign in to leave a comment.