From 1ebdf8415656e6a9da3cdafde5f86b3152d90300 Mon Sep 17 00:00:00 2001 From: "ityaozm@gmail.com" Date: Wed, 8 Nov 2023 17:39:58 +0800 Subject: [PATCH] Fix(tests): Reset repository in afterAll hook - Use 'git reset HEAD^' command to reset repository - Use 'git checkout -- .' command to discard changes - Add 'tests/Fixtures/repository/' to git staging area --- tests/Feature/CommitCommandTest.php | 2 +- tests/Fixtures/repository | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/CommitCommandTest.php b/tests/Feature/CommitCommandTest.php index 7731e5a..2f3179d 100755 --- a/tests/Feature/CommitCommandTest.php +++ b/tests/Feature/CommitCommandTest.php @@ -137,7 +137,7 @@ afterAll(static function (): void { // 清理 playground 仓库 - Process::fromShellCommandline('git reset b7a6f28', repository_path())->run(); + Process::fromShellCommandline('git reset HEAD^', repository_path())->run(); Process::fromShellCommandline('git checkout -- .', repository_path())->run(); Process::fromShellCommandline('git add tests/Fixtures/repository/', base_path())->mustRun(); }); diff --git a/tests/Fixtures/repository b/tests/Fixtures/repository index b7a6f28..8828cba 160000 --- a/tests/Fixtures/repository +++ b/tests/Fixtures/repository @@ -1 +1 @@ -Subproject commit b7a6f2831a7ca769ac34028714ec12bcff0f3881 +Subproject commit 8828cbacbc2d141440bf3457d0feacfa8582b77f