jsdom-eval
eval js inside jsdom for simple testing that requires the dom
Last updated 6 years ago by hayes .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jsdom-eval 
SYNC missed versions from official npm registry.

jsdom-eval

eval js inside jsdom for simple testing that requires the dom. if your scripts include a sourcemap, stack traces will point to locations in the original source (great for browserify!)

Usage

jsdom-eval ./my.js --html ./optional.html

or

cat ./my-js | jsdom-eval --html ./optional.html

example using browserify and tape to run dom based tests

browserify ./my_tape_test.js -d | jsdom-eval | faucet

This pipes to faucet because it will correctly set exit codes for tap output. jsdom-eval forwards your console output, but it acts like a browser and does not know anything about exit codes or how to interpret your scripts output.

API

jsdom-eval will either eval code from process.stdin or read the file of the first non flag arument. you may also specify an html file that will be loaded into jsdom with the --html or -H flag.

Current Tags

  • 0.2.5                                ...           latest (6 years ago)

16 Versions

  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |