O'Reilly logo

Learning Behavior-driven Development with JavaScript by Enrique Amodeo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing a rich Internet application

Now that we have a basic understanding of the capabilities of WebDriverJS and as we have clarified that we intend to test only our passive view in integration with the browser, we can start by setting up a project in the usual way: create a folder with the lib/ and test/ subfolders, issue the npm init command, and follow the instructions.

For the testing, we will use Mocha. Why not Cucumber.js? Well, it is a good idea to use Cucumber.js to test the core UI logic layer, as we will see later. However, passive view is a very technical layer in nature, and the only stakeholders that could be really interested in it would be the UX designer and the HTML/CSS expert. It is not uncommon that in some agile teams one or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required