@@ -28,7 +28,7 @@ test('should return config with one use key with one property', async t => {
2828 t . deepEqual ( config . plugins , expected ) ;
2929} ) ;
3030
31- test ( 'should return config with key config' , async t => {
31+ test ( 'should return config with key config plugins ' , async t => {
3232 const flags = {
3333 config : 'test/config/.config-plugins'
3434 } ;
@@ -38,6 +38,26 @@ test('should return config with key config', async t => {
3838 t . deepEqual ( config . plugins , expected ) ;
3939} ) ;
4040
41+ test ( 'should return config with key config options' , async t => {
42+ const flags = {
43+ config : 'test/config/.config-options'
44+ } ;
45+ const config = await cfgResolve ( { flags} ) ;
46+ const expected = { sync : true } ;
47+
48+ t . deepEqual ( config . options , expected ) ;
49+ } ) ;
50+
51+ test ( 'should return config options' , async t => {
52+ const flags = {
53+ options : { sync : true }
54+ } ;
55+ const config = await cfgResolve ( { flags} ) ;
56+ const expected = { sync : true } ;
57+
58+ t . deepEqual ( config . options , expected ) ;
59+ } ) ;
60+
4161test ( 'should return config with key config and use key' , async t => {
4262 const flags = {
4363 use : 'posthtml-assets' ,
@@ -55,13 +75,8 @@ test('should return config when CLI params priority', async t => {
5575 config : 'test/config/.config-input-priority'
5676 } ;
5777 const config = await cfgResolve ( { input, flags} ) ;
58- const expected = {
59- allInOutput : undefined ,
60- input : 'src/template/**/*.html' ,
61- output : undefined ,
62- root : './'
63- } ;
78+ const expected = 'src/template/**/*.html' ;
6479
65- t . deepEqual ( config , expected ) ;
80+ t . deepEqual ( config . input , expected ) ;
6681} ) ;
6782
0 commit comments