1 00:00:00,000 --> 00:00:04,591 [MUSIC] 2 00:00:04,591 --> 00:00:08,770 Hey everyone, I'm Guil, and this is JavaScript Unit Testing Basics. 3 00:00:08,770 --> 00:00:13,250 The material in this course assumes you know your way around JavaScript objects, 4 00:00:13,250 --> 00:00:14,890 node, and mpm. 5 00:00:14,890 --> 00:00:17,300 So make sure you complete all the prerequisites for 6 00:00:17,300 --> 00:00:18,730 this course before continuing. 7 00:00:18,730 --> 00:00:23,133 And if you wanna brush up on some of those videos, I've included the links and 8 00:00:23,133 --> 00:00:24,911 the teacher's notes as well. 9 00:00:24,911 --> 00:00:29,105 In this course, you'll practice a way to write JavaScript called, 10 00:00:29,105 --> 00:00:31,431 Behavior Driven Development or BDD. 11 00:00:31,431 --> 00:00:35,190 In BDD we write special functions, called tests, for 12 00:00:35,190 --> 00:00:39,645 our application before we actually write any real code. 13 00:00:39,645 --> 00:00:42,395 These tests describe how a code should work. 14 00:00:42,395 --> 00:00:47,677 In other words, tests describe the expected behavior of our application. 15 00:00:47,677 --> 00:00:51,087 Having these tests written already will help us understand the code we 16 00:00:51,087 --> 00:00:52,077 want to write. 17 00:00:52,077 --> 00:00:55,327 Like an outline, as we continue writing our code 18 00:00:55,327 --> 00:01:00,062 our tests will let us know as soon as our programs behave the way we want them to. 19 00:01:00,062 --> 00:01:02,627 They'll also tell us when we've accidentally broken something 20 00:01:02,627 --> 00:01:04,140 along the way. 21 00:01:04,140 --> 00:01:08,660 We'll build up our tests to cover one small unit of our code at a time. 22 00:01:08,660 --> 00:01:11,660 This style of testing is called unit testing. 23 00:01:11,660 --> 00:01:13,930 Since unit tests focus on small, 24 00:01:13,930 --> 00:01:18,940 meaningful chunks of functionality, good unit tests are easy to understand. 25 00:01:18,940 --> 00:01:21,680 They prove that each piece of our code does what we want. 26 00:01:22,800 --> 00:01:23,520 In the next video, 27 00:01:23,520 --> 00:01:26,560 I'll cover some of the ways unit testing makes development easier.