jsdom-global
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -0,1 +1,8 @@ | ||
## [v1.7.0] | ||
> Mar 21, 2016 | ||
- Implement `jsdom-global/register` for use in simpler cases. | ||
[v1.7.0]: https://github.com/rstacruz/jsdom-global/compare/v1.6.2...v1.7.0 | ||
## [v1.6.2] | ||
@@ -2,0 +9,0 @@ > Feb 22, 2016 |
{ | ||
"name": "jsdom-global", | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"description": "Enable DOM in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,13 +40,2 @@ # jsdom-global | ||
You can also invoke it with a function block so it'll clean up afterwards. | ||
```js | ||
var jsdom = require('jsdom-global') | ||
jsdom(function () { | ||
var $ = require('jquery') | ||
$('body').html('hello') | ||
}) | ||
``` | ||
## Tape | ||
@@ -66,4 +55,10 @@ | ||
Just add it to [mocha]'s `before` and `after` hooks. | ||
__Simple:__ Use Mocha's `--require` option. Add this to the `test/mocha.opts` file (create it if it doesn't exist) | ||
``` | ||
-r jsdom-global/register | ||
``` | ||
__Advanced:__ For finer control, you can instead add it via [mocha]'s `before` and `after` hooks. | ||
```js | ||
@@ -70,0 +65,0 @@ before(function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7390
9
78
123