Hypnotize
E2E test node server using nightmare.
Install
$ npm install --save-dev hypnotize
Usage
const assert = require('assert')const hypnotize = require('hypnotize')const express = require('express') const app = express() app.get('/info', function (req, res) { res.send('<p>Info</p>')}) hypnotize(app) .goto('/info') .evaluate(function () { return document.querySelector('p').innerText }) .end() .then(function (text) { assert.equal(text, 'Info') })
License
MIT