Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dna-engine/load-web-page-jsdom-mocha
Minimal example of loading a web page into jsdom and testing with Mocha
https://github.com/dna-engine/load-web-page-jsdom-mocha
example javascript jsdom localhost mocha nodejs testing url
Last synced: about 1 month ago
JSON representation
Minimal example of loading a web page into jsdom and testing with Mocha
- Host: GitHub
- URL: https://github.com/dna-engine/load-web-page-jsdom-mocha
- Owner: dna-engine
- License: mit
- Created: 2017-04-04T21:33:40.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T07:22:25.000Z (9 months ago)
- Last Synced: 2024-03-27T02:47:19.900Z (9 months ago)
- Topics: example, javascript, jsdom, localhost, mocha, nodejs, testing, url
- Language: JavaScript
- Homepage: https://dna-engine.org
- Size: 127 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# load-web-page-jsdom-mocha
_Minimal example of loading a web page into jsdom and testing with Mocha_
[![Build](https://github.com/dna-engine/load-web-page-jsdom-mocha/actions/workflows/run-spec-on-push.yaml/badge.svg)](https://github.com/dna-engine/load-web-page-jsdom-mocha/actions/workflows/run-spec-on-push.yaml)
### Instructions
Execute `spec-runner.sh.command` or enter the terminal commands:
```shell
$ 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`### Comparison
For a Puppeteer version, check out:
[load-web-page-puppeteer-mocha](https://github.com/dna-engine/load-web-page-puppeteer-mocha)---
[dna-engine.org](https://dna-engine.org) | [MIT License](LICENSE.txt)