diff --git a/test/hmr-options.json b/test/hmr-options.json new file mode 100644 index 0000000..959e032 --- /dev/null +++ b/test/hmr-options.json @@ -0,0 +1,4 @@ +{ + "theme": "positive", + "debug": true +} diff --git a/test/test-stdout.js b/test/test-stdout.js index f7f5751..73257dc 100644 --- a/test/test-stdout.js +++ b/test/test-stdout.js @@ -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'] ); });