Skip to content

Commit c13d78b

Browse files
committed
test: output resolve from config, issue #308
1 parent 8d93107 commit c13d78b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/config/.config-output

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
'output': 'dist/output.html'
3+
}

test/test-cfg-resolve.js

+11
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ test('should return config when input param from config', t => {
112112
t.deepEqual(config.input, expected);
113113
});
114114

115+
test('should return config when output param from config', t => {
116+
const input = 'input.html';
117+
const flags = {
118+
config: 'test/config/.config-output'
119+
};
120+
const config = cfgResolve({input, flags});
121+
const expected = 'dist/output.html';
122+
123+
t.deepEqual(config.output, expected);
124+
});
125+
115126
test('should return config when CLI input param priority', t => {
116127
const input = 'src/template/**/*.html';
117128
const flags = {

0 commit comments

Comments
 (0)