1 00:00:00,720 --> 00:00:05,250 We're now going to go around to our different test files and make sure that they all set up that just 2 00:00:05,250 --> 00:00:10,310 a mock call that we get that fake implementation as opposed to the real one. 3 00:00:10,320 --> 00:00:10,650 All right. 4 00:00:10,680 --> 00:00:15,630 So I'm going to go to my new test file here it is right here. 5 00:00:15,670 --> 00:00:17,880 I'm going to find the just mock line. 6 00:00:17,880 --> 00:00:24,270 Copy that and then I'll go round to the other test row handler files I have that I could go into index 7 00:00:24,270 --> 00:00:29,430 dot dot t s and then paste that at the top and then repeat that for the other two as well. 8 00:00:29,430 --> 00:00:34,200 That's definitely option but maybe doing this copy paste everywhere is not super efficient. 9 00:00:34,200 --> 00:00:39,270 So let me show you a slightly different approach rather than listing out this mock inside of every single 10 00:00:39,270 --> 00:00:41,010 one of our test files. 11 00:00:41,060 --> 00:00:46,170 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 12 00:00:46,170 --> 00:00:48,760 and find my test directory inside there. 13 00:00:48,770 --> 00:00:52,920 These Setup Dot T S file inside of here. 14 00:00:52,930 --> 00:00:58,270 Right before the before all statement I'm going to add in that just dot Mark and I'll make sure they 15 00:00:58,300 --> 00:01:03,790 update the root because now it is just up one folder to get to that Nat's wrapper file log in and set 16 00:01:03,790 --> 00:01:07,180 it to dot dot slash Nat's wrapper. 17 00:01:07,270 --> 00:01:11,350 This makes sure that all the different tests inside of our entire project are always going to use the 18 00:01:11,440 --> 00:01:14,740 marked or the fake version of Nat's wrapper. 19 00:01:14,740 --> 00:01:16,390 That is definitely something we want. 20 00:01:16,390 --> 00:01:21,610 In this case we do not want any of our different files in the test environment to try to get the real 21 00:01:21,640 --> 00:01:27,220 Nat's client because that thing is gonna try to make contact with the real NAT server again not what 22 00:01:27,220 --> 00:01:32,590 we want so then try to save this you know put back or my terminal. 23 00:01:32,680 --> 00:01:35,550 Now I should see all my tests passing. 24 00:01:35,720 --> 00:01:36,300 It looks good. 25 00:01:37,520 --> 00:01:42,810 You'll notice so we now also have a lot of console logs from all the successful even publishers as well. 26 00:01:42,890 --> 00:01:44,390 Now all this stuff definitely works. 27 00:01:44,390 --> 00:01:48,320 But you know there is something that is now missing from all of our tests. 28 00:01:48,350 --> 00:01:54,230 One thing that's super critical inside of our new test handler new handler excuse me and the update 29 00:01:54,230 --> 00:02:01,220 about handler is to make sure that we not only save a ticket but that we also publish a event as well. 30 00:02:01,220 --> 00:02:05,690 So I think that would be really nice if we could somehow test and make sure that we are truly publishing 31 00:02:06,020 --> 00:02:07,120 some events. 32 00:02:07,310 --> 00:02:11,120 So let's figure out how to add in some tests and make sure that these events are actually being published 33 00:02:11,330 --> 00:02:12,020 in the next video.