ljlm0402 / typescript-express-starter

📘 Quick and Easy TypeScript Express Starter
http://npm.im/typescript-express-starter
MIT License
2.72k stars 419 forks source link

Invalid imports in test files #190

Open ridenaio opened 2 years ago

ridenaio commented 2 years ago

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 commented 2 years ago

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

ridenaio commented 2 years ago

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 commented 1 year ago

I have the same issue with the default template: image

Is there another options to fix it than manually?

tiavina-mika commented 1 year ago

I fixed it by removing src/tests in excludeintsconfig.json

dap23 commented 1 year ago

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

dap23 commented 1 year ago

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