Some testing tools, such as Enzyme (we will learn about this in the following section), expect to be used in a web browser. In our example, the application uses nyc and ts-node to execute all our unit tests, which means that we are not using a web browser. Sometimes, it is possible to overcome this problem by using jsdom, which is described by its creators as follows:
If we examine the nyc command in the package.json file included in the companion source ...