Socket
Socket
Sign inDemoInstall

jsdom-global

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdom-global - npm Package Compare versions

Comparing version 1.6.2 to 1.7.0

register.js

7

HISTORY.md

@@ -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

2

package.json
{
"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 () {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc