allenhwkim / ngentest

Angular6+ Unit Test Generator For Components, Directive, Services, and Pipes
https://ngentest.github.io
MIT License
144 stars 60 forks source link

No Support for Arrow Functions? #58

Closed ravituvar closed 1 year ago

ravituvar commented 1 year ago

we have arrow functions as below

functionName = () => { // SOME FUNCTION CODE }

and It doesnt generate the unit tests cases for such methods/functions, anything can be done on this?

allenhwkim commented 1 year ago

Please provide a step to reproduce it.

ravituvar commented 8 months ago

If you have a arrow function for callbacks it doesn't generate the test for those functions

allenhwkim commented 8 months ago

The issue here is when you defined a=()=>b;, it's a variable not a function ngentest collects all functions to generate test, excluding variables for now.

On Tue, Jan 9, 2024 at 5:19 AM Ravi Tuvar @.***> wrote:

If you have a arrow function for callbacks it doesn't generate the test for those functions

— Reply to this email directly, view it on GitHub https://github.com/allenhwkim/ngentest/issues/58#issuecomment-1882790660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK7AJSKSGO6O3ZW23ZZH5TYNUKSLAVCNFSM6AAAAAAQXVE7HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSG44TANRWGA . You are receiving this because you modified the open/close state.Message ID: @.***>