We're now going to go around to our different test files and make sure that they all set up that just
a mock call that we get that fake implementation as opposed to the real one.
All right.
So I'm going to go to my new test file here it is right here.
I'm going to find the just mock line.
Copy that and then I'll go round to the other test row handler files I have that I could go into index
dot dot t s and then paste that at the top and then repeat that for the other two as well.
That's definitely option but maybe doing this copy paste everywhere is not super efficient.
So let me show you a slightly different approach rather than listing out this mock inside of every single
one of our test files.
I'm gonna go back to the new test t s file and delete it from right there and instead I'm going to go
and find my test directory inside there.
These Setup Dot T S file inside of here.
Right before the before all statement I'm going to add in that just dot Mark and I'll make sure they
update the root because now it is just up one folder to get to that Nat's wrapper file log in and set
it to dot dot slash Nat's wrapper.
This makes sure that all the different tests inside of our entire project are always going to use the
marked or the fake version of Nat's wrapper.
That is definitely something we want.
In this case we do not want any of our different files in the test environment to try to get the real
Nat's client because that thing is gonna try to make contact with the real NAT server again not what
we want so then try to save this you know put back or my terminal.
Now I should see all my tests passing.
It looks good.
You'll notice so we now also have a lot of console logs from all the successful even publishers as well.
Now all this stuff definitely works.
But you know there is something that is now missing from all of our tests.
One thing that's super critical inside of our new test handler new handler excuse me and the update
about handler is to make sure that we not only save a ticket but that we also publish a event as well.
So I think that would be really nice if we could somehow test and make sure that we are truly publishing
some events.
So let's figure out how to add in some tests and make sure that these events are actually being published
in the next video.