Book Image

Advanced JavaScript

By : Zachary Shute
Book Image

Advanced JavaScript

By: Zachary Shute

Overview of this book

If you are looking for a programming language to develop flexible and efficient applications, JavaScript is an obvious choice. Advanced JavaScript is a hands-on guide that takes you through JavaScript and its many features, one step at a time. You'll begin by learning how to use the new JavaScript syntax in ES6, and then work through the many other features that modern JavaScript has to offer. As you progress through the chapters, you’ll use asynchronous programming with callbacks and promises, handle browser events, and perform Document Object Model (DOM) manipulation. You'll also explore various methods of testing JavaScript projects. In the concluding chapters, you'll discover functional programming and learn to use it to build your apps. With this book as your guide, you'll also be able to develop APIs using Node.js and Express, create front-ends using React/Redux, and build mobile apps using React/Expo. By the end of Advanced JavaScript, you will have explored the features and benefits of JavaScript to build small applications.
Table of Contents (9 chapters)

Test Tools and Environments

Testing tools, frameworks, and environments are designed to make testing code simpler and quicker. There are many testing frameworks available for JavaScript and the most popular will be mentioned briefly. We then dive deeper into one of the frameworks and demonstrate how to use the framework to write good tests.

Testing Frameworks

You will need to select a testing framework based on the types of tests you wish to conduct. JavaScript is generally tested in one of three ways: general test, code coverage tests, and user interface tests. When selecting a framework, you must decide what you are testing and how you wish to go about it.

General tests will include your unit tests, functional tests, and integration tests. It is a sort of catch-all for your tests. The most popular frameworks for tests are Mocha, Jasmine, and Jest. Jest is used by Facebook and is one of the simpler frameworks to set up. Mocha is the most popular testing framework available for JavaScript and...