From 75f103ed9e1dc93627ebdd7fd7f17459e1bf803c Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Thu, 7 Feb 2019 11:53:02 -0800 Subject: [PATCH] add missing integration tests to scripts --- package-scripts.js | 2 +- .../options/reporter-option.spec.js | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/integration/options/reporter-option.spec.js diff --git a/package-scripts.js b/package-scripts.js index 391b28be92..30e4294be1 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -115,7 +115,7 @@ module.exports = { integration: { script: test( 'integration', - '--timeout 10000 --slow 3750 "test/integration/*.spec.js"' + '--timeout 10000 --slow 3750 "test/integration/**/*.spec.js"' ), description: 'Run Node.js integration tests', hiddenFromHelp: true diff --git a/test/integration/options/reporter-option.spec.js b/test/integration/options/reporter-option.spec.js new file mode 100644 index 0000000000..50d84ca597 --- /dev/null +++ b/test/integration/options/reporter-option.spec.js @@ -0,0 +1,25 @@ +'use strict'; + +var runMocha = require('../helpers').runMocha; + +describe('--reporter-option', function() { + describe('when given options w/ invalid format', function() { + it('should display an error', function(done) { + runMocha( + 'passing.fixture.js', + ['--reporter-option', 'foo=bar=baz'], + function(err, res) { + if (err) { + return done(err); + } + expect(res, 'to have failed').and( + 'to contain output', + /invalid reporter option/i + ); + done(); + }, + 'pipe' + ); + }); + }); +});