File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919var assert = require ( 'assert' ) ;
2020var duplexify ;
2121var extend = require ( 'extend' ) ;
22+ var format = require ( 'string-format-obj' ) ;
2223var googleAuth = require ( 'google-auto-auth' ) ;
2324var is = require ( 'is' ) ;
2425var mockery = require ( 'mockery-next' ) ;
@@ -109,14 +110,17 @@ describe('common/util', function() {
109110 } ) ;
110111
111112 it ( 'should export an error for module instantiation errors' , function ( ) {
112- var missingProjectIdError = new Error ( [
113+ var errorMessage = format ( [
113114 'Sorry, we cannot connect to Google Cloud Services without a project ID.' ,
114115 'You may specify one with an environment variable named' ,
115- '"GCLOUD_PROJECT".' ,
116- 'See https://googlecloudplatform.github.io/gcloud-node/#/authentication' ,
117- 'for a detailed guide on creating an authenticated connection.'
118- ] . join ( ' ' ) ) ;
116+ '"GCLOUD_PROJECT". See {baseUrl}/{path} for a detailed guide on creating' ,
117+ 'an authenticated connection.'
118+ ] . join ( ' ' ) , {
119+ baseUrl : 'https://googlecloudplatform.github.io/gcloud-node/#' ,
120+ path : '/docs/guides/authentication'
121+ } ) ;
119122
123+ var missingProjectIdError = new Error ( errorMessage ) ;
120124 assert . deepEqual ( util . missingProjectIdError , missingProjectIdError ) ;
121125 } ) ;
122126
You can’t perform that action at this time.
0 commit comments