Skip to content

Commit c8f9a54

Browse files
committed
test: input from config, issue #308,#313
1 parent d76f655 commit c8f9a54

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

test/config/.config-input

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
'input': 'src/**/*.html'
3+
}

test/test-cfg-resolve.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ test('should return config with key config and use key', t => {
8484
t.deepEqual(config.plugins, expected);
8585
});
8686

87+
test('should return config when input param from config', t => {
88+
const flags = {
89+
config: 'test/config/.config-input'
90+
};
91+
const config = cfgResolve({flags});
92+
const expected = [path.resolve('src/**/*.html')];
93+
94+
t.deepEqual(config.input, expected);
95+
});
96+
8797
test('should return config when CLI input param priority', t => {
8898
const input = 'src/template/**/*.html';
8999
const flags = {

0 commit comments

Comments
 (0)