Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid imports in test files #190

Open
ridenaio opened this issue Nov 2, 2022 · 6 comments
Open

Invalid imports in test files #190

ridenaio opened this issue Nov 2, 2022 · 6 comments
Assignees
Labels

Comments

@ridenaio
Copy link

ridenaio commented Nov 2, 2022

Summary (요약)

I created a new project with prisma template. All tests are passing, but imports are not visible. I use latest VS code.

How to this these imports (problem exists only in .test.ts files).

Untitled

@Mounir-Bennacer
Copy link

you have to use ../app instead of @/ and you should be good to go

@ridenaio
Copy link
Author

ridenaio commented Nov 3, 2022

Yes, I can, but this is the template, it should work or maybe need to be fixed?

Moreover is /src folder these imports like @/app, @/utils works perfectly. What's the difference?

@tiavina-mika
Copy link

I have the same issue with the default template:
image

Is there another options to fix it than manually?

@tiavina-mika
Copy link

tiavina-mika commented Nov 19, 2022

I fixed it by removing src/tests in exclude in tsconfig.json

@dap23
Copy link

dap23 commented Apr 6, 2023

try
import { App } from '@/app';

@dap23
Copy link

dap23 commented Apr 6, 2023

or just edit class App in app.ts
to export default class App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants