Search icon CANCEL
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
Mastering Reactive JavaScript

You're reading from   Mastering Reactive JavaScript Building asynchronous and high performing web apps with RxJS

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781786463388
Length 310 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Erich de Souza Oliveira Erich de Souza Oliveira
Author Profile Icon Erich de Souza Oliveira
Erich de Souza Oliveira
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. What Does Being Reactive Mean? FREE CHAPTER 2. Reacting for the First Time 3. A World Full of Changes - Reactive Extensions to the Rescue 4. Transforming Data - Map, Filter, and Reduce 5. The World Changes Too Fast - Operators to Deal with Backpressure 6. Too Many Sources - Combining Observables 7. Something is Wrong - Testing and Dealing with Errors 8. More about Operators 9. Composition 10. A Real-Time Server 11. A Real-Time Client

Testing the application

There are several ways that you could create tests for your application; one of the possible options is to create unit tests for your application.

If we decided to create unit tests for our client application, we would need a way to mock the connection with our servers; this would involve creating a new (and slightly complex) build for our tests.

We could also create end to end tests, to test the whole flow of a user. Doing this would probably involve using some external tool to run our tests in the context of a browser and automatize the user input. This would also involve an extra step of running a tool such as Selenium or CasperJS.

There are several books on the different ways you can test a frontend application. Here I'm choosing to implement the simplest solution, which involves creating a page for the test using mocha as explained in Chapter 7, Something is Wrong - Testing 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 ₹800/month. Cancel anytime