You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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. |
2 years ago | |
---|---|---|
.. | ||
git-auth-helper.test.ts | 2 years ago | |
git-command-manager.test.ts | 2 years ago | |
git-directory-helper.test.ts | 2 years ago | |
git-version.test.ts | 5 years ago | |
input-helper.test.ts | 3 years ago | |
modify-work-tree.sh | 5 years ago | |
override-git-version.cmd | 5 years ago | |
override-git-version.sh | 5 years ago | |
ref-helper.test.ts | 4 years ago | |
retry-helper.test.ts | 4 years ago | |
verify-basic.sh | 5 years ago | |
verify-clean.sh | 5 years ago | |
verify-lfs.sh | 5 years ago | |
verify-no-unstaged-changes.sh | 5 years ago | |
verify-side-by-side.sh | 5 years ago | |
verify-submodules-false.sh | 5 years ago | |
verify-submodules-recursive.sh | 5 years ago | |
verify-submodules-true.sh | 5 years ago |