1 00:00:00,630 --> 00:00:01,800 Instructor: In this section, we're gonna dive 2 00:00:01,800 --> 00:00:04,710 right into our first technical topic which is testing. 3 00:00:04,710 --> 00:00:06,150 So we're going to learn about testing 4 00:00:06,150 --> 00:00:08,700 of React and Redux applications. 5 00:00:08,700 --> 00:00:10,620 Now, I've taught testing across a variety 6 00:00:10,620 --> 00:00:13,800 of different frameworks, libraries and languages. 7 00:00:13,800 --> 00:00:16,680 And over time I've come to realize that doing a lecture 8 00:00:16,680 --> 00:00:20,670 about the theory of testing tends to not be super effective. 9 00:00:20,670 --> 00:00:22,380 So rather than having a long discussion 10 00:00:22,380 --> 00:00:24,330 about what testing is and how we do it 11 00:00:24,330 --> 00:00:25,830 and some of the theory behind it, 12 00:00:25,830 --> 00:00:27,390 we're going to instead dive right in 13 00:00:27,390 --> 00:00:30,060 to some very practical examples. 14 00:00:30,060 --> 00:00:30,930 So in this section, 15 00:00:30,930 --> 00:00:33,660 we're going to generate a new React project 16 00:00:33,660 --> 00:00:35,310 and then we'll immediately start writing 17 00:00:35,310 --> 00:00:37,950 some tests for it inside the next video. 18 00:00:37,950 --> 00:00:40,650 So to get started, I'm gonna open up my command line 19 00:00:40,650 --> 00:00:43,290 and I'm gonna check to see if I have a command line tool 20 00:00:43,290 --> 00:00:45,750 called create-react-app already installed 21 00:00:45,750 --> 00:00:47,520 on my local system. 22 00:00:47,520 --> 00:00:49,140 To check to see if I do, 23 00:00:49,140 --> 00:00:52,410 I'll simply write out create-react-app 24 00:00:52,410 --> 00:00:55,893 with dashes between each word and then I'll hit enter. 25 00:00:57,000 --> 00:00:58,050 Now, you'll notice that I get 26 00:00:58,050 --> 00:00:59,850 a little popup like this right here. 27 00:00:59,850 --> 00:01:01,290 If you see this text on the screen 28 00:01:01,290 --> 00:01:03,690 that looks just like mine, then you're good to go. 29 00:01:03,690 --> 00:01:04,650 But if you see a message 30 00:01:04,650 --> 00:01:06,930 that says create-react-app command not found, 31 00:01:06,930 --> 00:01:09,030 or some error message like that, 32 00:01:09,030 --> 00:01:12,480 then you need to very quickly install create-react-app. 33 00:01:12,480 --> 00:01:15,030 So if you need to install it, you can run the command 34 00:01:15,030 --> 00:01:20,030 npm install -g create-react-app like so. 35 00:01:20,700 --> 00:01:23,610 Let's go ahead and run that command and let it do its thing. 36 00:01:23,610 --> 00:01:27,180 Then after you have successfully installed create-react-app, 37 00:01:27,180 --> 00:01:29,100 we can generate a new project 38 00:01:29,100 --> 00:01:32,760 by running the command create-react-app 39 00:01:32,760 --> 00:01:35,250 and then the name of our new project. 40 00:01:35,250 --> 00:01:37,230 The first project that we're going to be work on 41 00:01:37,230 --> 00:01:39,390 is focused on testing and so we're gonna name 42 00:01:39,390 --> 00:01:40,950 this project after that. 43 00:01:40,950 --> 00:01:43,923 We'll say create-react-app testing like so. 44 00:01:45,180 --> 00:01:46,200 Then you'll hit enter, 45 00:01:46,200 --> 00:01:48,570 that's going to generate a new React project for me 46 00:01:48,570 --> 00:01:50,940 and start installing some dependencies. 47 00:01:50,940 --> 00:01:53,730 So we're gonna use this new project to learn a lot more 48 00:01:53,730 --> 00:01:56,880 about testing the React and Redux application. 49 00:01:56,880 --> 00:01:58,680 So let's take a quick pause right here. 50 00:01:58,680 --> 00:01:59,940 We'll come back in the next section 51 00:01:59,940 --> 00:02:01,890 after these dependencies have been installed 52 00:02:01,890 --> 00:02:04,853 and we'll start talking about how we're gonna test this app.