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
Inserver/domain I created a TestService class which is importing a composable from server/utils.
server/utils/test.ts :
exportconstuseTest=()=>{return1}
server/domain/test-service.ts :
exportclassTestService{privatetest=useTest()}
When I initialize the TestService class inside an api endpoint it works, but when I try to initialize the same class inside a test this error appears ReferenceError: useTest is not defined.
Environment
Reproduction
https://stackblitz.com/edit/github-7fr8te?file=test%2Fapp.test.ts
Describe the bug
In
server/domain
I created aTestService
class which is importing a composable fromserver/utils
.server/utils/test.ts
:server/domain/test-service.ts
:When I initialize the
TestService
class inside an api endpoint it works, but when I try to initialize the same class inside a test this error appearsReferenceError: useTest is not defined
.test/app.test.ts
:Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: