File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 33/* eslint no-use-before-define: 0 */
44
55const BbPromise = require ( 'bluebird' ) ;
6+ const chalk = require ( 'chalk' ) ;
67
78module . exports = {
89 invokeFunction ( ) {
@@ -45,7 +46,7 @@ module.exports = {
4546 } ;
4647 }
4748
48- const log = `${ res . executionId } : ${ res . result } ` ;
49+ const log = `${ chalk . grey ( res . executionId ) } ${ res . result } ` ;
4950
5051 this . serverless . cli . log ( log ) ;
5152
Original file line number Diff line number Diff line change 22
33const sinon = require ( 'sinon' ) ;
44const BbPromise = require ( 'bluebird' ) ;
5+ const chalk = require ( 'chalk' ) ;
56
67const GoogleProvider = require ( '../../provider/googleProvider' ) ;
78const GoogleInvoke = require ( '../googleInvoke' ) ;
@@ -130,7 +131,7 @@ describe('InvokeFunction', () => {
130131 } ;
131132
132133 const expectedOutput =
133- 'wasdqwerty: Foo bar' ;
134+ ` ${ chalk . grey ( 'wasdqwerty' ) } Foo bar` ;
134135
135136 return googleInvoke . printResult ( result ) . then ( ( ) => {
136137 expect ( consoleLogStub . calledWithExactly ( expectedOutput ) ) . toEqual ( true ) ;
@@ -140,7 +141,8 @@ describe('InvokeFunction', () => {
140141 it ( 'should print an error message to the console when no result was received' , ( ) => {
141142 const result = { } ;
142143
143- const expectedOutput = 'error: An error occurred while executing your function...' ;
144+ const expectedOutput =
145+ `${ chalk . grey ( 'error' ) } An error occurred while executing your function...` ;
144146
145147 return googleInvoke . printResult ( result ) . then ( ( ) => {
146148 expect ( consoleLogStub . calledWithExactly ( expectedOutput ) ) . toEqual ( true ) ;
You can’t perform that action at this time.
0 commit comments