Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/cli/src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ describe('CLI Structure', () => {
expect(jsonOption).toBeDefined();
});

it('stats command should have json option', () => {
const options = statsCommand.options;
const jsonOption = options.find((opt) => opt.long === '--json');
it('stats command should have show subcommand with json option', () => {
const subcommands = statsCommand.commands;
const showCommand = subcommands.find((cmd) => cmd.name() === 'show');

expect(jsonOption).toBeDefined();
expect(showCommand).toBeDefined();

if (showCommand) {
const jsonOption = showCommand.options.find((opt) => opt.long === '--json');
expect(jsonOption).toBeDefined();
}
});

it('clean command should have force option', () => {
Expand Down
Loading