You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We declare functions with the variable semantics to make mocking a lot easier.
For example we will declare var MyFunc= func() instead of func MyFunc()
The commands for generating unit tests does not recognize this semantic as functions and does no generate any unit test template.
Describe the solution you'd like
I would like the commands for generating units tests to also work for the variable semantic.
So a function declared var MyFunc= func() would produce the same unit test as func MyFunc().
Describe alternatives you've considered
As an alternative I made a regex to convert functions to each declaration semantic using text replace: var MyFunc= func() -> func MyFunc():
match: var ([a-zA-Z]*) = func(\([a-zA-Z\s\.\*]*\))
replace: func $1$2
func MyFunc() -> var MyFunc= func():
match: func ([a-zA-Z]*)(\([a-zA-Z\s\.\*]*\))
replace: var $1 = func$2
I have to convert the functions, use the generate unit tests command, and then convert back the functions semantic.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We declare functions with the variable semantics to make mocking a lot easier.
For example we will declare
var MyFunc= func()
instead offunc MyFunc()
The commands for generating unit tests does not recognize this semantic as functions and does no generate any unit test template.
Describe the solution you'd like
I would like the commands for generating units tests to also work for the variable semantic.
So a function declared
var MyFunc= func()
would produce the same unit test asfunc MyFunc()
.Describe alternatives you've considered
As an alternative I made a regex to convert functions to each declaration semantic using text replace:
var MyFunc= func()
->func MyFunc()
:match:
var ([a-zA-Z]*) = func(\([a-zA-Z\s\.\*]*\))
replace:
func $1$2
func MyFunc()
->var MyFunc= func()
:match:
func ([a-zA-Z]*)(\([a-zA-Z\s\.\*]*\))
replace:
var $1 = func$2
I have to convert the functions, use the generate unit tests command, and then convert back the functions semantic.
The text was updated successfully, but these errors were encountered: