Skip to content

Commit

Permalink
[test] allow transport query test to deal with nested objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed May 10, 2012
1 parent b102fd2 commit 9e43630
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/transports/transport.js
Expand Up @@ -58,6 +58,9 @@ module.exports = function (transport, options) {
'should return matching results': function (err, results) {
if (!transport.query) return;
results = results[transport.name];
while (!Array.isArray(results)) {
results = results[Object.keys(results).pop()];
}
var log = results.pop();
assert.ok(log.message.indexOf('hello world') === 0
|| log.message.indexOf('test message') === 0);
Expand Down

0 comments on commit 9e43630

Please sign in to comment.