Skip to content

Minimal example of loading a web page into jsdom and testing with Mocha

License

Notifications You must be signed in to change notification settings

dna-engine/load-web-page-jsdom-mocha

Repository files navigation

load-web-page-jsdom-mocha

logo

Minimal example of loading a web page into jsdom and testing with Mocha

Build

Instructions

Execute spec-runner.sh.command or enter the terminal commands:

$ git clone https://github.com/dna-engine/load-web-page-jsdom-mocha
$ cd load-web-page-jsdom-mocha
$ npm install
$ npm test  #runs "mocha spec.js"

For development testing, set the url variable in spec.js to your local web server, such as: http://localhost:8080

screenshot

Comparison

For a Puppeteer version, check out:
load-web-page-puppeteer-mocha


dna-engine.org | MIT License