factory-girl
Advanced tools
Comparing version 0.1.2 to 0.1.3
19
index.js
@@ -99,2 +99,4 @@ (function() { | ||
factory.promisify = function(promiseLibrary) { | ||
var promisify = promiseLibrary.promisify || promiseLibrary.denodeify; | ||
if (!promisify) throw new Error("No 'promisify' or 'denodeify' method found in supplied promise library"); | ||
var promisified = {}; | ||
@@ -104,11 +106,6 @@ for (var i in factory) { | ||
} | ||
var promisify = promiseLibrary.promisify || promiseLibrary.denodeify; | ||
if (promisify) { | ||
promisified.build = promisify(factory.build); | ||
promisified.create = promisify(factory.create); | ||
return promisified; | ||
} | ||
else { | ||
throw new Error("No 'promisify' or 'denodeify' method found in supplied promise library"); | ||
} | ||
promisified.build = promisify(factory.build); | ||
promisified.create = promisify(factory.create); | ||
promisified.cleanup = promisify(factory.cleanup); | ||
return promisified; | ||
}; | ||
@@ -123,2 +120,3 @@ | ||
}, cb1); | ||
factories[name].created = []; | ||
}, callback); | ||
@@ -145,2 +143,5 @@ }; | ||
}; | ||
/** | ||
Be aware that the model may have already been destroyed | ||
*/ | ||
Adapter.prototype.destroy = function(doc, Model, cb) { | ||
@@ -147,0 +148,0 @@ doc.destroy(cb); |
@@ -6,3 +6,3 @@ { | ||
"author": "Simon Wade", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"keywords": ["factory", "test", "bdd", "tdd", "fixture"], | ||
@@ -9,0 +9,0 @@ "repository" : { |
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
15026
336