Join my mailing list for more exclusive content and access to the archive of my private tips of the week: mobirony.ck.page/4a331b9076
@richiekosher6218 Жыл бұрын
so nice to have someone go beyond "create a todo-list-app with randomframework in 5 minutes" and really explain topics beyond
@saylorsedell2380 Жыл бұрын
Liked, subscribed and very grateful for an awesome video! The observer-spy sounds like a game-changer so will definitely look into it! Also your photo's remind me of the various emotional state a programmer goes through while writing tests XD
@matiasmiraballes9240 Жыл бұрын
this video is just in time. I was just trying to figure out how to use observer-spy. Thanks, great video as always
@emeraldelnas4833 Жыл бұрын
Great video again! Do you have a tutorial about testing for beginners?
@JoshuaMorony Жыл бұрын
I have a few different videos about testing on my channel, some of them are a bit older now. The only "proper" guide to testing I have is this module on Elite Ionic: eliteionic.com/modules/test-driven-development/ some of the lessons are free but it is part of a paid course
@Supaship6000 Жыл бұрын
Killing it with these videos!!
@Charon061 Жыл бұрын
Could you provide link to repo. I want to check testing with marbles on yours use case
@JoshuaMorony Жыл бұрын
Which one were you interested in? There's a bunch of different repos I'm showing in this video
@@JoshuaMorony Would you mind linking the repo for the LoginStore spec example?
@DavidWeiss2 Жыл бұрын
Thanks!
@jonathangamble Жыл бұрын
you should put an underscore in front of index since you're not using the first parameter
@asatorftw Жыл бұрын
Do you have a video on choosing when to use ngrx component store vs global store? Im experimented a bit with component store recently but cant rly think of a scenario that I cant handle smoother with global store. Mostly because im missing actions.
@JoshuaMorony Жыл бұрын
For me it's just always Component Store until Store becomes apparently necessary, but for me I never run into those situations - I think the benefit usually comes up more in larger teams with more complex apps, and I am generally just developing alone. However, if you are productive with Store and like using it, then I think there is no reason not to use it even for the most simple circumstances (although it still probably makes sense to use Component Store for state that is local to just a single component - but again, that's up to you).
@MattBodman Жыл бұрын
Wondering if you've started testing Angular with Cypress yet?
@JoshuaMorony Жыл бұрын
I've been doing E2E tests with Cypress in Angular for a long time, but I haven't touched component testing with Cypress yet
@MattBodman Жыл бұрын
@@JoshuaMorony have you made videos on Cypress?
@JoshuaMorony Жыл бұрын
@@MattBodman I have a few where I use Cypress like this one: kzfaq.info/get/bejne/q8uWetCDyK_RY5c.html generally any of my videos on TDD or E2E - but I don't really have a deep dive into how Cypress works or anything like that
@michaelfaith Жыл бұрын
Nice video. But I think the one big flaw of the approach in the last example is that it requires all the Subjects to be public, when, traditionally, i think they should be private. Do you have a solution for when the Subjects are private?
@JoshuaMorony Жыл бұрын
I make a point to never change my code to make the tests viable, and often you do run into situations like this where you can't access something because it is private - but then I always just change the test because with the black box style approach I shouldn't need to access private things. In this case, the subjects are actually meant to be public as I am next-ing them from the template. However, if they were private and say I had methods being called from the template instead then I would either just trigger that method instead of nexting the subject, or I could also trigger the click handler in the template if I wanted to as well.
@michaelfaith Жыл бұрын
@@JoshuaMorony Solid answer. I think with the recent update of making protected members accessible by the template, it seems like even in this case, those subjects could be protected and hard to get to, which I guess would just leave triggering the clicks as your input to the test?
@JoshuaMorony Жыл бұрын
@@michaelfaith yes I think that would be the most correct way to do it (triggering a click) as that is how it would actually be interacted with, my approach at the moment makes the tests a bit easier/nicer to write but also run the risk of being bitten by a refactor (i.e. if a code reviewer like yourself wanted to make those class members protected before merging lol)
@pedrofernandes2005 Жыл бұрын
I'm assuming you are using NX because "standard" Angular does not have Jest. So for a lot of people this might be even more confusing because the testing methods are not exactly the same.
@JoshuaMorony Жыл бұрын
The apps in this video aren't using Nx, but yes Jest was installed separately using the briebug schematic