Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced JavaScript

You're reading from   Advanced JavaScript Speed up web development with the powerful features and benefits of JavaScript

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher
ISBN-13 9781789800104
Length 330 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Zachary Shute Zachary Shute
Author Profile Icon Zachary Shute
Zachary Shute
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime