0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-07-03 16:52:39 +02:00
Commit graph

6 commits

Author SHA1 Message Date
sminnie bb965fa266 Add 2 test cases for submodule status.
This commit adds tests to verify the behavior of the gitDirectoryHelper.prepareExistingDirectory() function when the submodule status is either true or false.
The test cleanWhenSubmoduleStatusIsFalse verifies that the function will clean the directory when the submodule status is false. The test sets up a mock implementation of git.submoduleStatus to always return false, writes a file to the repository, and then calls gitDirectoryHelper.prepareExistingDirectory(). The test verifies that the directory is cleaned and that git.tryClean() is called.
The test doesNotCleanWhenSubmoduleStatusIsTrue verifies that the function will not clean the directory when the submodule status is true. The test sets up a mock implementation of git.submoduleStatus to always return true, writes a file to the repository, and then calls gitDirectoryHelper.prepareExistingDirectory(). The test verifies that the directory is not cleaned, that the file and .git folder are present, and that git.tryClean() is called.
These tests ensure that the function behaves as expected based on the submodule status.
2023-03-19 17:44:24 -07:00
SKi d12863bffd
Add mock implementation for new function submoduleStatus 2023-03-02 09:28:25 -08:00
eric sciple fb6f360df2
fix default branch for .wiki and when using ssh (#284) 2020-06-18 10:20:33 -04:00
eric sciple e52d022eb5
Fetch all history for all tags and branches when fetch-depth=0 (#258) 2020-05-27 09:54:28 -04:00
eric sciple 422dc45671
add support for submodules (#173) 2020-03-05 14:21:59 -05:00
eric sciple f219062370
more unit tests and corresponding refactoring (#174) 2020-03-02 11:33:30 -05:00