JavaScript Testing Best Practices
What you'll learn
- Master different testing types such as unit testing, behavioral testing, smoke testing, and more
- Work with the most widespread JavaScript testing tools such as Jasmine, Mocha, and Jest
- Master all Test-Driven Development best practices
- Write tests in a comprehensible manner and set up the foundations for BDD
- Organize and split your code in a way that allows efficient testing
- Mock dependencies so you can focus on what really matters
- Write a framework-agnostic, end-to-end testing suite for your frontend applications
- Learn and apply industry best practices while also learning when it's necessary to break the rules of testing
Course content
- Preview02:58
- 05:00Write Great Test Names
- 05:10Single Responsibility Principle
- 05:25Covering All Test Cases
- 03:33Improving Your Tests with a Linter
- 04:06Handling and Expecting Errors
- 5 questionsTest your knowledge
Requirements
- Prior knowledge of JavaScript and testing is assumed.
Description
JavaScript brings vast amounts of freedom to both frontend and backend developers. However, that freedom comes at a cost: the need to continually screen your applications for bugs and possible optimizations. The presence of multiple testing frameworks such as Jasmine and Mocha confuses newcomers and experienced JavaScript devs when it comes to deciding which one is the best tool for the job.
In this course, you will delve into different aspects and specifics of JavaScript testing. You will enhance your skills by mastering many topics that have been a source of confusion in the past—such as integration testing, E2E testing, and Behavioral Driven Development. You will learn how to break down your code into systems that you can challenge individually in an isolated environment, thus catching bugs early before they reach production.
With the testing skills you've acquired, you will examine the most available testing frameworks and tools (including Jasmine, Mocha, Chai, and Jest) to find the one that suits you best. Having the right tool for the job will help you work with Test-Driven and Behavioral-Driven Development on all application layers.
About the Author
Dimitris Loukas is a software engineer and is currently part of a growing start-up building a revolutionary referral marketing platform with Node.js, Angular, MySQL, Redis, and Docker. He is also developing trading software applications using C#, Aurelia and TypeScript. He is a Packt author and has developed many video tutorials in C#, .NET Core, and TypeScript. He has worked for two start-ups in the past, is active in the open-source community, and loves taking up small side-projects. He has developed microservices using C# and Node.js and has also mastered Angular, Aurelia, and Vue.js. He is an early adopter of .NET Core and is fascinated by modern JavaScript and where the web is going.
Who this course is for:
- This course is for all types of JavaScript developers (frontend, backend, and full-stack) who wish to learn how to build efficient testing suites for all layers of their applications and following industry best practices.
Instructor
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.