Skip to content

Commit 4ad0c33

Browse files
committed
test: resolve output when CLI priority
1 parent 8588060 commit 4ad0c33

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

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

test/test-cfg-resolve.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,14 @@ test('should return config when CLI input param priority', t => {
134134
t.deepEqual(config.input, expected);
135135
});
136136

137+
test('should return config when CLI output param priority', t => {
138+
const input = 'input.html';
139+
const flags = {
140+
output: 'public/output.html',
141+
config: 'test/config/.config-output-priority'
142+
};
143+
const config = cfgResolve({input, flags});
144+
const expected = 'public/output.html';
145+
146+
t.deepEqual(config.output, expected);
147+
});

0 commit comments

Comments
 (0)