Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lapwinglabs/x-ray-phantom
phantom driver for x-ray.
https://github.com/lapwinglabs/x-ray-phantom
Last synced: 2 days ago
JSON representation
phantom driver for x-ray.
- Host: GitHub
- URL: https://github.com/lapwinglabs/x-ray-phantom
- Owner: lapwinglabs
- Created: 2015-02-04T09:58:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-07T11:32:44.000Z (over 8 years ago)
- Last Synced: 2024-11-06T03:05:57.364Z (8 days ago)
- Language: JavaScript
- Homepage:
- Size: 160 KB
- Stars: 111
- Watchers: 15
- Forks: 29
- Open Issues: 20
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# x-ray-phantom
phantom driver for [x-ray](https://github.com/lapwinglabs/x-ray).
## Installation
```
npm install x-ray-phantom
```## Usage
```js
var phantom = require('x-ray-phantom');
var Xray = require('x-ray');var x = Xray()
.driver(phantom());x('http://google.com', 'title')(function(err, str) {
if (err) return done(err);
assert.equal('Google', str);
done();
})
```## API
### phantom([options|fn], [fn])
Initialize the phantom driver with `options` being passed to Nightmare and
an optional custom `fn` with the signature `function(nightmare, done)`.## Test
```
npm install
make test
```## License
MIT