Add tests for raw JSON and file via --options / -o.

This commit is contained in:
hacksalot 2016-01-11 20:52:17 -05:00
parent f965bf456a
commit 342b960f63
2 changed files with 19 additions and 0 deletions

4
test/hmr-options.json Normal file
View File

@ -0,0 +1,4 @@
{
"theme": "positive",
"debug": true
}

View File

@ -88,4 +88,19 @@ describe('Testing Ouput interface', function () {
run('HMR should output help doc with --help',
['--help'], [ manPage ]);
run('HMR should accept raw JSON via --options',
[
'build',
'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json',
'-o',
"{ theme: 'compact', debug: true, pdf: 'wkhtmltopdf' }"],
[ 'Applying COMPACT theme', '(with wkhtmltopdf)'] );
run('HMR should accept a JSON settings file via --options',
[
'build',
'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json',
'--options',
"test/hmr-options.json"],
[ 'Applying POSITIVE theme'] );
});