From cf43939c5e99f17b6deb6799fe107adbb587d8af Mon Sep 17 00:00:00 2001 From: kingdaro Date: Fri, 26 Jan 2018 11:19:37 -0500 Subject: [PATCH] test: add test for showing help on no options --- .../help/help-output-no-command/stdin.js | 16 ++++++++++++++++ .../help/help-output-no-command/test.opts | 0 2 files changed, 16 insertions(+) create mode 100644 test/binCases/help/help-output-no-command/stdin.js create mode 100644 test/binCases/help/help-output-no-command/test.opts diff --git a/test/binCases/help/help-output-no-command/stdin.js b/test/binCases/help/help-output-no-command/stdin.js new file mode 100644 index 00000000000..12056a98bda --- /dev/null +++ b/test/binCases/help/help-output-no-command/stdin.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout).toEqual(expect.anything()); + expect(stdout).toContain("Config options:"); + expect(stdout).toContain("Basic options:"); + expect(stdout).toContain("Module options:"); + expect(stdout).toContain("Output options:"); + expect(stdout).toContain("Advanced options:"); + expect(stdout).toContain("Resolving options:"); + expect(stdout).toContain("Optimizing options:"); + expect(stdout).toContain("Stats options:"); + expect(stdout).toContain("Options:"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/help/help-output-no-command/test.opts b/test/binCases/help/help-output-no-command/test.opts new file mode 100644 index 00000000000..e69de29bb2d