hyperactive
Advanced tools
Comparing version 2.1.1 to 2.1.2
{ | ||
"name": "hyperactive", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Creates mocha tests for all hypermedia of your API", | ||
@@ -5,0 +5,0 @@ "author": "Tabcorp Digital Technology Team", |
@@ -34,6 +34,6 @@ // Generated by CoffeeScript 1.7.1 | ||
createIt = (function(_this) { | ||
return function(url) { | ||
return function(url, templateValues) { | ||
return localItFunction(url, function(done) { | ||
return build.request(url, config.options).end(function(res) { | ||
return exports.processResponse(url, res, config.templateValues, done); | ||
return exports.processResponse(url, res, templateValues, done); | ||
}); | ||
@@ -47,6 +47,6 @@ }); | ||
if (!res.ok) { | ||
return done(res.text); | ||
return done("Bad status " + res.status + " for url " + res.url); | ||
} | ||
if (!validate(parent, res)) { | ||
return done("Not a valid response: " + res.text); | ||
return done("Not a valid response: " + res.body); | ||
} | ||
@@ -56,5 +56,5 @@ describe("" + parent, function() { | ||
var expandedLink; | ||
linkFilter.processLink(link); | ||
expandedLink = expandUrl(link, templateValues); | ||
linkFilter.processLink(expandedLink); | ||
return exports.crawl(expandedLink); | ||
return exports.crawl(expandedLink, templateValues); | ||
}); | ||
@@ -81,4 +81,4 @@ }); | ||
exports.crawl = function(url) { | ||
return createIt(url); | ||
exports.crawl = function(url, templateValues) { | ||
return createIt(url, templateValues); | ||
}; | ||
@@ -95,3 +95,3 @@ | ||
linkFilter.processLink(expandedUrl); | ||
return exports.crawl(expandedUrl); | ||
return exports.crawl(expandedUrl, config.templateValues); | ||
}; | ||
@@ -98,0 +98,0 @@ |
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
10837