File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 22
33const expect = require ( 'chai' ) . expect ;
44const sinon = require ( 'sinon' ) ;
5+ const path = require ( 'path' ) ;
56const BbPromise = require ( 'bluebird' ) ;
67const Serverless = require ( 'serverless/lib/Serverless' ) ;
78const AwsProvider = require ( 'serverless/lib/plugins/aws/provider/awsProvider' ) ;
@@ -154,6 +155,17 @@ describe('#yamlParse', () => {
154155 expect ( yamlParserStub . calledWith ( `${ servicePath } /${ fileName } ` ) ) . to . be . equal ( true ) ;
155156 } ) ;
156157 } ) ;
158+
159+ it ( 'should read relative serviceFileName path if passed as --config option' , ( ) => {
160+ const servicePath = serverlessStepFunctions . serverless . config . servicePath ;
161+ const relativeFilename = './some_folder/other_config.yml' ;
162+ serverlessStepFunctions . options . config = relativeFilename ;
163+ const serviceFilePath = path . normalize ( `${ servicePath } /${ relativeFilename } ` ) ;
164+ serverlessStepFunctions . yamlParse ( )
165+ . then ( ( ) => {
166+ expect ( yamlParserStub . calledWith ( serviceFilePath ) ) . to . be . equal ( true ) ;
167+ } ) ;
168+ } ) ;
157169 } ) ;
158170
159171 describe ( '#getAllStateMachines()' , ( ) => {
You can’t perform that action at this time.
0 commit comments