hypnotize

0.2.0 • Public • Published

Hypnotize

Build Status Coverage Status dependencies Status devDependencies Status JavaScript Style Guide Greenkeeper badge

Hypno

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

/hypnotize/

    Package Sidebar

    Install

    npm i hypnotize

    Weekly Downloads

    2

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • gerhut