Super Speed – Time-Travel Paradoxes and Broken Promises
In this chapter, we will discuss how we deal with issues that arise with multithreaded execution in an event loop of a test framework. Then, we’ll look at a way to keep the switches in a framework in a consistent location when we begin to add more complex functionality.
JavaScript is an insanely fast programming language. Because its primary goal is to build website pages as fast as possible, it executes lines of code in an event loop with multiple threads. This is an advantage in building web pages as fast as possible, but it can be a hindrance in test automation that needs events executed in a particular order.
In fact, this speedster is so fast it can time travel. Let us take a look at an example in the next section.
Before we do that, here's a list of the topics we'll cover in this chapter:
- The time-travel dilemma
- Schrödinger and the quantum mechanics of test automation ...