Currently we have a ton of tests called supports debug mode. This command tests if the --debug flag is available for the command. In the past we had to add this test in order to get 100% code coverage.
However after refactoring the code base to use the # functions we are using now, this is currently not needed anymore.
Since the test has no added value in my eyes, I'd say we should delete it, this will also speed up to run our test 😇
Example:
|
it('supports debug mode', () => { |
|
const options = command.options; |
|
let containsOption = false; |
|
options.forEach(o => { |
|
if (o.option === '--debug') { |
|
containsOption = true; |
|
} |
|
}); |
|
assert(containsOption); |
|
}); |
Currently we have a ton of tests called
supports debug mode. This command tests if the--debugflag is available for the command. In the past we had to add this test in order to get 100% code coverage.However after refactoring the code base to use the
#functions we are using now, this is currently not needed anymore.Since the test has no added value in my eyes, I'd say we should delete it, this will also speed up to run our test 😇
Example:
cli-microsoft365/src/m365/aad/commands/user/user-get.spec.ts
Lines 308 to 317 in 291f17c