diff --git a/packages/common/test/util.js b/packages/common/test/util.js index 2a6624c9f76..af3c23bd015 100644 --- a/packages/common/test/util.js +++ b/packages/common/test/util.js @@ -799,14 +799,14 @@ describe('common/util', function() { utilOverrides.decorateRequest = function(reqOpts, projectId) { assert.strictEqual(projectId, authClient.projectId); - done(); + setImmediate(done); }; var makeAuthenticatedRequest = util.makeAuthenticatedRequestFactory({ customEndpoint: true }); - makeAuthenticatedRequest({ + makeAuthenticatedRequest({}, { onAuthenticated: assert.ifError }); }); @@ -821,14 +821,14 @@ describe('common/util', function() { utilOverrides.decorateRequest = function(reqOpts, projectId) { assert.strictEqual(projectId, config.projectId); - done(); + setImmediate(done); }; var makeAuthenticatedRequest = util.makeAuthenticatedRequestFactory( config ); - makeAuthenticatedRequest({ + makeAuthenticatedRequest({}, { onAuthenticated: assert.ifError }); });