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 @@ -28,6 +28,7 @@ describe('cli/config', function () {
2828 sinon . stub ( parsers , 'yaml' ) . returns ( phonyConfigObject ) ;
2929 sinon . stub ( parsers , 'json' ) . returns ( phonyConfigObject ) ;
3030 sinon . stub ( parsers , 'js' ) . returns ( phonyConfigObject ) ;
31+ sinon . stub ( parsers , 'mjs' ) . returns ( phonyConfigObject ) ;
3132 } ) ;
3233
3334 describe ( 'when supplied a filepath with ".yaml" extension' , function ( ) {
@@ -74,6 +75,17 @@ describe('cli/config', function () {
7475 } ) ;
7576 } ) ;
7677
78+ describe ( 'when supplied a filepath with ".mjs" extension' , function ( ) {
79+ const filepath = 'foo.mjs' ;
80+
81+ it ( 'should use the MJS parser' , function ( ) {
82+ loadConfig ( filepath ) ;
83+ expect ( parsers . mjs , 'to have calls satisfying' , [
84+ { args : [ filepath ] , returned : phonyConfigObject }
85+ ] ) . and ( 'was called once' ) ;
86+ } ) ;
87+ } ) ;
88+
7789 describe ( 'when supplied a filepath with ".jsonc" extension' , function ( ) {
7890 const filepath = 'foo.jsonc' ;
7991
You can’t perform that action at this time.
0 commit comments