Skip to content

Instantly share code, notes, and snippets.

View taiiiraaa's full-sized avatar

taiiiraaa

  • London
View GitHub Profile
@taiiiraaa
taiiiraaa / test_with_nightmare_js.md
Last active August 1, 2020 19:56
Automated browser testing with Nightmare, Mocha and Chai

Nightmare is a browser automation library for Node.js. It can be used with Mocha and Chai to create BDD style tests.

Before we start, check to make sure Node.js is installed on your system.

Use npm to install all the required packages. If package.json doesn't exist, run npm init first.

npm install mocha --save-dev
npm install chai --save-dev
npm install mocha-generators --save-dev
npm install nightmare --save-dev