From 342b960f633969c66ec0ff819470cadeb0c9b058 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Mon, 11 Jan 2016 20:52:17 -0500 Subject: [PATCH] Add tests for raw JSON and file via --options / -o. --- test/hmr-options.json | 4 ++++ test/test-stdout.js | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/hmr-options.json 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'] ); });