If you use a declaration types, u need to use TS_NODE_FILES=true in the test script cuz ts-node dont recognize easy the declartions types
@MirzaMaulanapositivejutsu Жыл бұрын
Such a great tutorial, especially for someone like me who just got into javascript and typescript. But I've got some problem when running the test files, sometime it runs successfully and sometime it got fails.
@yasinnabi2 жыл бұрын
This is one of the best channel I have Subbed ! thank you for sharing such a nice videos. a fellow creator....
@TomDoesTech2 жыл бұрын
Thanks for the sub!
@sunilgautam712 жыл бұрын
I'm waiting for a series of Design Patterns with TS.
@ahmedaz69172 жыл бұрын
If we want an object to inherit from another object, the super() method should precede the constructor function or should follow the constructor function
@TomDoesTech2 жыл бұрын
okay?
@АндрейГусев-с6ц Жыл бұрын
Greate tutorial. But it could be more simple if use Jest, supertest and mock DB in docker from official prisma docs.
@TomDoesTech Жыл бұрын
If you think that would be simpler, you should use that stuff. However, you're not going to think it's simple when you run into some weird problems
@tucoalbuquerque Жыл бұрын
How did you made it use the .env.test database url ?
@VasuRangpariya6 ай бұрын
How to pass authToken header for protected API ? and why we need to buildServer on every test is this the real scenario test cases ?
@TomDoesTech6 ай бұрын
You pass the token in the Authorization header. You need builder server for every time because you need an instance of the server to test against. You could have a global one if you wanted I guess, but I like to make tests as independant as possible
@RakhaRandhikatama8 ай бұрын
im using ts-alias, and im getting error importing using "@", can anyone help me
@ssss97252 жыл бұрын
Why you don't use t.mock() function included in tap?
@TomDoesTech2 жыл бұрын
I can't remember exactly, I think I couldn't get it to work with TS
@Mikeforu Жыл бұрын
Hi m getting one issue environment variable not found: Database_Url when i run yarn dev command. pls reply
@TomDoesTech Жыл бұрын
Did you define the variable?
@euanmorgann Жыл бұрын
I ran into an issue with the test script "TSError: ⨯ Unable to compile TypeScript". Just incase anybody has the same issue I was able to fix it by adding "ts-node": { "files": true } Into my tsconfig.json