This post is going to create two WebWorkers and let them communicate with each other through a MessageChannel. Moreover, the WebWorkers implement the Producer-consumer-problem. The WebWorker #1 is the producer. It generates Fibonacci numbers and posts the result to the WebWorker #2. The WebWorker #2 receives the numbers and removes some of them. When it’s done with the work it posts the result back to the WebWorker #1. The WebWorker #1 fills some numbers again and posts them back to the WebWorker #2 and so on…

When it comes to writing comprehensive tests we always need a sort of “data provider” necessary to execute the tests several times with a different input. The test methods (like it) should be written, of course, just once.