Тёмный

How do test code using inject() 

Rainer Hahnekamp
Подписаться 5 тыс.
Просмотров 1,4 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@sachindanielvarkey2377
@sachindanielvarkey2377 Месяц назад
Thanks for the video Rainer, One question on this is if I use the DI function imported in some service/component and try to mock the function in the unit test spec it still gives me the ng0203 error. Try to run in the runIninjectioncontext() still showing the inject() error for ng0203.
@RainerHahnekamp
@RainerHahnekamp Месяц назад
Hey, what exactly do you try to mock? Do you maybe have a code example?
@sander-s
@sander-s 6 месяцев назад
Interesting. I’ve been using the parameter-declarator approach for years already. I was aware of the inject function and use that approach for Testing. Now finally I understand the background of these implementations after watching your video. Thank you for providing your the video.
@RainerHahnekamp
@RainerHahnekamp 6 месяцев назад
You are very welcome. It seems like that the explanation at the very beginning is even more valuable than the acutal testing :D
@vutruong4164
@vutruong4164 6 месяцев назад
indeed I find the technical background of the inject function very rewarding to know, since it is what I would need to convince my teammates to choose 1 approach over the other. You are killing it with this testing series. A lot of new stuff come out for Angular, but I believe the testing documentation has not caught up fast enough.
@RainerHahnekamp
@RainerHahnekamp 6 месяцев назад
Thanks a lot, I was hoping that my explanation at the very beginning is of help. Have these discussions about inject all the time ;)
@yaibanoutsukushii
@yaibanoutsukushii 6 месяцев назад
great video! I wish I knew about it earlier, I needed like days to find out how to test inject() in functional resolvers...
@RainerHahnekamp
@RainerHahnekamp 6 месяцев назад
Thanks, yeah, sometimes these things are easier than it seems :)
@paulh6933
@paulh6933 7 месяцев назад
Another excellent video on testing
@RainerHahnekamp
@RainerHahnekamp 7 месяцев назад
Thanks very much Paul. Next one will come out tomorrow!
Далее
The Flaws of Inheritance
10:01
Просмотров 946 тыс.
ХОККЕЙНАЯ КЛЮШКА ИЗ БУДУЩЕГО?
00:29
▼ КАПИТАН НАШЁЛ НЕФТЬ В 🍑
33:40
Просмотров 473 тыс.
How do I test Signals (signal / computed / effect)
20:15
Mastering Dependency Injection In Golang
14:29
Просмотров 49 тыс.
Dependency Injection Explained in 7 Minutes
7:11
Просмотров 60 тыс.
Inject C# In Any .NET App With This Secret Entry Point
15:06
How do I test and mock Standalone Components
12:29
Просмотров 2,9 тыс.
Introducing Playwright
48:53
Просмотров 3,2 тыс.