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
I expect to implement unit test and unit tests to pass without errors.
Current Behavior
I got this error "Decorators cannot be used to decorate parameters" when implementing unit testing in my app.
I expect that unit tests to pass with pointing to the line where I implement the "@Inject"
All errors says "Decorators cannot be used to decorate parameters" and pointing to the "@Inject" in the constructor of the class.
Possible Solution
by removing the "@Inject" from constructor, unit tests pass.
@mohammadamer are you using the legacy experimental decorators flag? InversifyJS was written before the Typescript 5.0 implemetation/release of the finalised decorator proposal and is not currently compatible with it.
For the time being, if you want to use inversifyjs decorators then you still need to enable the legacy decorator support when compiling.
Expected Behavior
I expect to implement unit test and unit tests to pass without errors.
Current Behavior
I got this error "Decorators cannot be used to decorate parameters" when implementing unit testing in my app.
I expect that unit tests to pass with pointing to the line where I implement the "@Inject"
All errors says "Decorators cannot be used to decorate parameters" and pointing to the "@Inject" in the constructor of the class.
Possible Solution
by removing the "@Inject" from constructor, unit tests pass.
Steps to Reproduce (for bugs)
Got the error with this syntex:
Test passes with this syntex
Context
It prevent us from building unit tests for the project.
Your Environment
Another Environment for another project where unit test passes but with different versions:
The text was updated successfully, but these errors were encountered: