Try Blinkist to get the key ideas from 7,500+ bestselling nonfiction titles and podcasts. Listen or read in just 15 minutes.
Get startedBlink 3 of 8 - The 5 AM Club
by Robin Sharma
Testable JavaScript by Mark Trostler is a comprehensive guide that teaches you how to write JavaScript code that is easy to test. It covers testing techniques, tools, and best practices to help you build reliable and maintainable applications.
In Testable JavaScript by Mark Trostler, we embark on a journey to explore the world of testable JavaScript. The book begins with an introduction to the fundamentals of testing, including the different types of tests, such as unit, integration, and end-to-end tests. We also learn about the various testing frameworks and tools available to JavaScript developers.
Trostler then delves into the principles of test-driven development (TDD) and behavior-driven development (BDD). He explains how these methodologies can help us write better code by focusing on testing first, and then writing code to fulfill those tests. He also provides insights into how to effectively use TDD and BDD in JavaScript projects.
The book then shifts its focus to the code itself, discussing how to write testable JavaScript. We explore topics such as modularization, dependency injection, and mocking, all of which are essential techniques for writing code that is easy to test. Trostler emphasizes the importance of writing code that is decoupled and modular, making it more testable and maintainable.
He also introduces us to various design patterns and best practices that can aid in writing testable code. We learn about patterns like the revealing module pattern, the constructor pattern, and the singleton pattern, and how they can be used to write modular and testable JavaScript.
In the next section, the focus is on unit testing, a fundamental aspect of testable JavaScript. Trostler provides a comprehensive overview of unit testing in JavaScript, covering topics such as test structure, assertions, and test runners. He also discusses how to handle asynchronous code in tests, a common scenario in JavaScript development.
Following unit testing, we move on to integration testing and end-to-end testing. Trostler explains the importance of these types of tests and provides insights into how to effectively write and run them. We also learn about tools like Selenium and CasperJS that can aid in automating these tests.
As we progress through the book, we explore the concept of continuous integration (CI) and continuous deployment (CD) and how they fit into the world of testable JavaScript. Trostler explains how CI/CD pipelines can be set up for JavaScript projects, including automating the testing and deployment processes.
We also learn about the importance of code coverage and how it can be used to measure the effectiveness of our tests. Trostler introduces us to tools that can help us measure code coverage and how to use this data to improve our testing strategies.
Another critical aspect of testable JavaScript is debugging. Trostler provides an in-depth look at various tools and techniques for debugging JavaScript code, both on the client and server side. He discusses the use of browser developer tools, Node.js debugging, and remote debugging, among others.
Finally, the book touches upon the topic of performance testing. We learn about the importance of performance testing in JavaScript applications and the tools and techniques available for conducting such tests. Trostler emphasizes the significance of testing for performance early and often in the development process.
In conclusion, Testable JavaScript by Mark Trostler provides a comprehensive guide to writing testable JavaScript code. It covers a wide range of topics, from the fundamentals of testing to advanced techniques like CI/CD, debugging, and performance testing. By the end of the book, readers will have a deep understanding of how to write testable, maintainable, and high-performing JavaScript applications.
Testable JavaScript by Mark Trostler provides a comprehensive guide to writing testable code in JavaScript. The book covers various testing techniques, tools, and best practices to help developers create reliable and maintainable JavaScript applications. It is a valuable resource for anyone looking to improve the quality of their JavaScript code through testing.
JavaScript developers who want to improve the testability of their code
Software engineers looking to adopt test-driven development practices
Those interested in learning about testing frameworks and tools for JavaScript
It's highly addictive to get core insights on personally relevant topics without repetition or triviality. Added to that the apps ability to suggest kindred interests opens up a foundation of knowledge.
Great app. Good selection of book summaries you can read or listen to while commuting. Instead of scrolling through your social media news feed, this is a much better way to spend your spare time in my opinion.
Life changing. The concept of being able to grasp a book's main point in such a short time truly opens multiple opportunities to grow every area of your life at a faster rate.
Great app. Addicting. Perfect for wait times, morning coffee, evening before bed. Extremely well written, thorough, easy to use.
Try Blinkist to get the key ideas from 7,500+ bestselling nonfiction titles and podcasts. Listen or read in just 15 minutes.
Get startedBlink 3 of 8 - The 5 AM Club
by Robin Sharma