Skip to content
forked from Gerhut/hypnotize

E2E test node server using nightmare.

License

Notifications You must be signed in to change notification settings

jzhzhz/hypnotize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

E2E test node server using nightmare.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.0%
  • HTML 9.0%