Comparing version 0.2.1 to 0.2.2
@@ -20,2 +20,3 @@ var Spooky = require('spooky'), | ||
self.finished = false; | ||
self.wait = self.haunted.definition.wait || 0; | ||
@@ -208,19 +209,23 @@ // set up our actions array | ||
} | ||
// use a 1s timeout in case a couple scripts are still being waited on | ||
setTimeout(function() { | ||
// set the final values for all queries | ||
async.forEach(self.queries, function(query, done) { | ||
self.haunted.storage.getValue(query.query, function(err, n) { | ||
query.after = n; | ||
query.test.occurred = n; | ||
done(err); | ||
if (self.queries.length > 0) { | ||
// use a timeout in case a couple scripts are still being waited on | ||
setTimeout(function() { | ||
// set the final values for all queries | ||
async.forEach(self.queries, function(query, done) { | ||
self.haunted.storage.getValue(query.query, function(err, n) { | ||
query.after = n; | ||
query.test.occurred = n; | ||
done(err); | ||
}); | ||
}, function() { | ||
self.finisher(); | ||
}); | ||
}, function() { | ||
self.finisher(); | ||
}); | ||
}, 500) | ||
}, self.wait) | ||
} else { | ||
self.finisher(); | ||
} | ||
self.finished = true; | ||
@@ -227,0 +232,0 @@ } |
{ | ||
"name": "haunted", | ||
"description": "A node module for validating site analytics", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"keywords": [ | ||
@@ -31,4 +31,4 @@ "node", | ||
"readmeFilename": "README.md", | ||
"_id": "haunted@0.2.1", | ||
"_id": "haunted@0.2.2", | ||
"_from": "haunted@0.2.x" | ||
} |
@@ -130,2 +130,5 @@ # Haunted | ||
### wait (optional) | ||
The number of milliseconds to wait before final (post-visit) check of datastore. Useful if you have delayed writes. | ||
### sets (required) | ||
@@ -132,0 +135,0 @@ In Haunted, a set is an array of URLs which are expected. You can define multiple sets (each of which has multiple URLs), and each page can reference multiple sets. Note that URLs will be naively partially matched, such that if a requested resource contains one of these URLs as a substring, it will be considered a match. For example: |
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
24067
477
188