diff --git a/lib/gcli/test/helpers.js b/lib/gcli/test/helpers.js index 0b4d2f0a..264da202 100644 --- a/lib/gcli/test/helpers.js +++ b/lib/gcli/test/helpers.js @@ -578,7 +578,7 @@ helpers._exec = function(options, name, expected) { } else { convertPromise = output.convert('dom', context).then(function(node) { - return node.textContent.trim(); + return (node == null) ? '' : node.textContent.trim(); }); } @@ -791,6 +791,10 @@ helpers.audit = function(options, audits) { 'due to ' + audit.skipRemainingIf.name : ''; assert.log('Skipped ' + name + ' ' + skipReason); + + // Tests need at least one pass, fail or todo. Create a dummy pass + assert.ok(true, 'Each test requires at least one pass, fail or todo'); + return Promise.resolve(undefined); } }