File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -265,4 +265,29 @@ describe('the deploy function', () => {
265265 expect ( mockDeployProject . mock . calls [ 0 ] [ 0 ] . serviceSid ) . toBe ( undefined ) ;
266266 expect ( mockDeployProject . mock . calls [ 0 ] [ 0 ] . serviceName ) . toBe ( APP_NAME ) ;
267267 } ) ;
268+
269+ it ( 'display an error when the and API key is not provided' , ( ) => {
270+ return expect (
271+ deploy . call ( {
272+ twilioClient : {
273+ username : 'testAccountSid' ,
274+ password : 'testAuthToken' ,
275+ accountSid : 'testAccountSid' ,
276+ } ,
277+ flags : { } ,
278+ } )
279+ ) . rejects . toMatchInlineSnapshot ( `
280+ [Error: No API Key found.
281+
282+ Please login to the Twilio CLI to create an API key:
283+
284+ twilio login
285+
286+ Alternatively, the Twilio CLI can use credentials stored in these environment variables:
287+
288+ TWILIO_ACCOUNT_SID = your Account SID from twil.io/console
289+ TWILIO_API_KEY = an API Key created at twil.io/get-api-key
290+ TWILIO_API_SECRET = the secret for the API Key]
291+ ` ) ;
292+ } ) ;
268293} ) ;
You can’t perform that action at this time.
0 commit comments