From 1deca6b16245ce4dc28bdbcc66bc207e7a09143a Mon Sep 17 00:00:00 2001 From: Dinika Saxena Date: Wed, 4 Dec 2024 11:55:18 +0100 Subject: [PATCH] Add an "it" block for each flag for easier debug-ability Signed-off-by: Dinika Saxena --- test/node-unit/cli/mocha-flags.spec.js | 6 +++--- test/node-unit/cli/options.spec.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/node-unit/cli/mocha-flags.spec.js b/test/node-unit/cli/mocha-flags.spec.js index dbd56334b2..29647dea05 100644 --- a/test/node-unit/cli/mocha-flags.spec.js +++ b/test/node-unit/cli/mocha-flags.spec.js @@ -7,9 +7,9 @@ const { describe('mocha-flags', function () { describe('expectedTypeForFlag()', function () { - it('returns expected type for all mocha flags', function () { - Object.entries(types).forEach(([dataType, flags]) => { - flags.forEach(flag => { + Object.entries(types).forEach(([dataType, flags]) => { + flags.forEach(flag => { + it(`returns expected ${flag}'s type as ${dataType}`, function () { expect(expectedTypeForFlag(flag), 'to equal', dataType); }); }); diff --git a/test/node-unit/cli/options.spec.js b/test/node-unit/cli/options.spec.js index 4e9e381c64..a99812d328 100644 --- a/test/node-unit/cli/options.spec.js +++ b/test/node-unit/cli/options.spec.js @@ -295,6 +295,7 @@ describe('options', function () { result = loadOptions('--no-diff --no-config'); }); + it('should return parsed args, default config and package.json', function () { expect( result,