diff --git a/src/analyzer.ts b/src/analyzer.ts index 5038f9cc..2a6d6c70 100644 --- a/src/analyzer.ts +++ b/src/analyzer.ts @@ -82,7 +82,7 @@ export const analyze = async ({ dir, apply = [], ignore = [], exclude, groupBy, output.push({ info: `${BG_INFO}Analyzing Vue, TS and JS files in ${dir}${BG_RESET}` }) output.push({ info: `${applyingMessage} - Ignoring ${ignoredRulesets.length} rules/rulesets: ${ignoreRulesetsOutput} + Ignoring ${ignoredRulesets.length} rules: ${ignoreRulesetsOutput} Excluding ${exclude || '-'} Output level ${BG_INFO}${level}${BG_RESET} Grouping by ${BG_INFO}${groupBy}${BG_RESET} diff --git a/src/index.test.ts b/src/index.test.ts index 89204c06..7cb1f8aa 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -15,9 +15,14 @@ describe('yarn analyze command with default configuration', () => { expect(stdout).toContain('Analyzing Vue, TS and JS files in ') }) - it.todo('should error out when both apply and ignore are used', async () => { - const { stderr } = await execa('yarn', ['analyze', '--ignore=vue-strong', '--apply=rrd']) - expect(stderr).toContain('Cannot use both --ignore and --apply options together.') + it('should error out when both apply and ignore are used', async () => { + try { + await execa('yarn', ['analyze', '--ignore=vue-strong', '--apply=rrd']) + } + catch (error: any) { + expect(error.stderr).toContain('Cannot use both --ignore and --apply options together.') + expect(error.exitCode).toBe(1) + } }) it('should report error for invalid ignore rulesets and exit with code 1', async () => {