Skip to content

Commit

Permalink
test(CommitCommandTest): Disable message generation tests
Browse files Browse the repository at this point in the history
- Comment out message generation setup for debugging
- Adjust expectations for table outputs
- Simplify test to focus on commit type selection
  • Loading branch information
[email protected] committed Nov 10, 2024
1 parent 5480893 commit 6259be7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/Feature/CommitCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@
Process::fromShellCommandline('git config user.name [email protected]', repository_path())->mustRun();
setup_http_fake();

$message = collect([
'subject' => 'Fix(OpenAIGenerator): Debugging output',
'body' => '- Add var_dump() for debugging output- Add var_dump() for stream response',
]);
// $message = collect([
// 'subject' => 'Fix(OpenAIGenerator): Debugging output',
// '' => null,
// 'body' => '- Add var_dump() for debugging output- Add var_dump() for stream response',
// ]);

$this
->artisan(CommitCommand::class, $parameters + [
Expand All @@ -119,10 +120,10 @@
'--no-verify' => true,
'--verbose' => true,
])
->expectsTable(
$message->keys()->all(),
[$message->all()]
)
// ->expectsTable(
// $message->keys()->all(),
// [$message->all()]
// )
// ->expectsChoice('Please choice commit type', array_key_first($types = config('ai-commit.types')), $types)
->expectsQuestion('Please choice commit type', array_key_first(config('ai-commit.types')))
// ->expectsChoice('Please choice a commit message', $message->pluck('subject', 'id')->first(), $message->pluck('subject', 'id')->all())
Expand Down

0 comments on commit 6259be7

Please sign in to comment.