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

bondjs

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bondjs - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

.editorconfig

21

lib/bond.js
// Generated by CoffeeScript 2.0.0-beta8
void function () {
var allStubs, arrayEqual, bond, createAnonymousSpy, createReturnSpy, createThroughSpy, enhanceSpy, isFunction, nextTick, registerCleanupHook;
var allStubs, arrayEqual, bond, createAnonymousSpy, createReturnSpy, createThroughSpy, enhanceSpy, isFunction, nextTick, registerCleanupHook, registered;
isFunction = function (obj) {

@@ -91,8 +91,13 @@ return typeof obj === 'function';

allStubs = [];
(registerCleanupHook = function () {
registered = false;
registerCleanupHook = function () {
var after;
after = 'undefined' !== typeof afterEach && null != afterEach ? afterEach : 'undefined' !== typeof testDone && null != testDone ? testDone : null != this.cleanup ? this.cleanup : function () {
if (registered)
console.log('blocked registration');
if (registered)
return;
after = 'undefined' !== typeof afterEach && null != afterEach ? afterEach : 'undefined' !== typeof testDone && null != testDone ? testDone : null != ('undefined' !== typeof QUnit && null != QUnit ? QUnit.testDone : void 0) ? 'undefined' !== typeof QUnit && null != QUnit ? QUnit.testDone : void 0 : null != bond.cleanup ? bond.cleanup : function () {
throw new Error('bond.cleanup must be specified if your test runner does not use afterEach or testDone');
};
return after(function () {
after(function () {
var stubRestore;

@@ -103,7 +108,11 @@ for (var i$ = 0, length$ = allStubs.length; i$ < length$; ++i$) {

}
return allStubs = [];
allStubs = [];
return console.log('restored all');
});
})();
console.log('registered');
return registered = true;
};
bond = function (obj, property) {
var asyncReturn, previous, registerRestore, restore, returnMethod, through, to;
registerCleanupHook();
if (arguments.length === 0)

@@ -110,0 +119,0 @@ return createAnonymousSpy();

{
"name": "bondjs",
"version": "1.1.1",
"version": "1.2.0",
"description": "simple js stub/spy library",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,9 +0,9 @@

# bond
# bond ![build status](https://travis-ci.org/EndangeredMassa/bond.png) [![David](https://david-dm.org/EndangeredMassa/bond.png)](https://david-dm.org/EndangeredMassa/bond)
_the simple stub/spy javascript library_
[![David](https://david-dm.org/EndangeredMassa/bond.png)](https://david-dm.org/EndangeredMassa/bond)
![build status](https://travis-ci.org/EndangeredMassa/bond.png)
bond only provides stubbing and spy functionality.

@@ -10,0 +10,0 @@ For test running and assertions,

Sorry, the diff of this file is not supported yet

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