From 0b8aad7884503c2cb20b9fda5e6749edbe98d06b Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Thu, 30 Jan 2020 23:24:37 +0530 Subject: [PATCH] chore: add test case for unknown flags --- test/node/node.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/node/node.test.js b/test/node/node.test.js index d2396935b37..0159acbbb2e 100644 --- a/test/node/node.test.js +++ b/test/node/node.test.js @@ -44,4 +44,9 @@ describe('node flags', () => { done(); }); }); + + it('throws an error on supplying unknown flags', () => { + const { stderr } = run(__dirname, ['--node-args', '--unknown']); + expect(stderr).toContain('node: bad option:'); + }); });