Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

window-mock

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

window-mock - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

6

lib/window-node-mock.js

@@ -23,2 +23,3 @@ 'use strict';

this._attributes = {};
this._eventListeners = {};
this.children = [];

@@ -49,2 +50,7 @@ this.classList = new _classListMock2.default();

}, {
key: 'addEventListener',
value: function addEventListener(e, f) {
this._eventListeners[e] = f;
}
}, {
key: 'firstChild',

@@ -51,0 +57,0 @@ get: function get() {

2

package.json
{
"name": "window-mock",
"version": "0.0.12",
"version": "0.0.13",
"description": "A light-weight window mock for Node/io.js unit-testing",

@@ -5,0 +5,0 @@ "main": "lib/window-mock.js",

@@ -8,2 +8,3 @@ import ClassListMock from './class-list-mock';

this._attributes = {};
this._eventListeners = {};
this.children = [];

@@ -32,4 +33,8 @@ this.classList = new ClassListMock();

}
addEventListener(e, f) {
this._eventListeners[e] = f;
}
}
export default WindowNodeMock;

@@ -25,2 +25,6 @@ import test from 'tape';

t.equal(typeof mock.addEventListener, 'function', 'addEventListener should be a function');
mock.addEventListener('click', () => { });
t.equal(typeof mock._eventListeners['click'], 'function', 'addEventListener should append listeners');
t.end();

@@ -27,0 +31,0 @@ });

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