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 2
2
3
3
const expect = require ( 'chai' ) . expect ;
4
4
const sinon = require ( 'sinon' ) ;
5
+ const path = require ( 'path' ) ;
5
6
const BbPromise = require ( 'bluebird' ) ;
6
7
const Serverless = require ( 'serverless/lib/Serverless' ) ;
7
8
const AwsProvider = require ( 'serverless/lib/plugins/aws/provider/awsProvider' ) ;
@@ -154,6 +155,17 @@ describe('#yamlParse', () => {
154
155
expect ( yamlParserStub . calledWith ( `${ servicePath } /${ fileName } ` ) ) . to . be . equal ( true ) ;
155
156
} ) ;
156
157
} ) ;
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
+ } ) ;
157
169
} ) ;
158
170
159
171
describe ( '#getAllStateMachines()' , ( ) => {
You can’t perform that action at this time.
0 commit comments