Comparing version 1.1.1 to 1.2.0
// 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
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
19696
10
176