@@ -30,7 +30,7 @@ test('should return config with one use key with one property', async t => {
3030
3131test ( 'should return config with key config' , async t => {
3232 const flags = {
33- config : 'test/config/.config'
33+ config : 'test/config/.config-plugins '
3434 } ;
3535 const config = await cfgResolve ( { flags} ) ;
3636 const expected = { 'posthtml-bem' : { } } ;
@@ -41,11 +41,27 @@ test('should return config with key config', async t => {
4141test ( 'should return config with key config and use key' , async t => {
4242 const flags = {
4343 use : 'posthtml-assets' ,
44- config : 'test/config/.config'
44+ config : 'test/config/.config-plugins '
4545 } ;
4646 const config = await cfgResolve ( { flags} ) ;
4747 const expected = { 'posthtml-bem' : { } , 'posthtml-assets' : { } } ;
4848
4949 t . deepEqual ( config . plugins , expected ) ;
5050} ) ;
5151
52+ test ( 'should return config when CLI params priority' , async t => {
53+ const input = { input : 'src/template/**/*.html' } ;
54+ const flags = {
55+ config : 'test/config/.config-input-priority'
56+ } ;
57+ const config = await cfgResolve ( { input, flags} ) ;
58+ const expected = {
59+ allInOutput : undefined ,
60+ input : 'src/template/**/*.html' ,
61+ output : undefined ,
62+ root : './'
63+ } ;
64+
65+ t . deepEqual ( config , expected ) ;
66+ } ) ;
67+
0 commit comments