superagent-cheerio is a small plugin that connects together SuperAgent and cheerio.
It came from using SuperTest for testing, and wanting easy access to cheerio for testing html/xml responses.
Installation
SuperAgent and cheerio are peer dependencies, you need to add them yourself.
$ npm install superagent cheerio superagent-cheerio
Usage for a single request
const request = const superagentCheerio = const res = await requestconsole // or promises request
Usage for lots of requests
const request = const superagentCheerio = const agent = requestconst res = await agentconsole // or promises agent
Usage with cheerio load method options
const request = const superagentCheerio = const res = await requestconsole // or promises request
Running tests
Install dependencies:
$ npm install
Run tests:
$ npm test
License
MIT