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.
checkout/__test__
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.
2 years ago
..
git-auth-helper.test.ts Add mock implementation for new function submoduleStatus 2 years ago
git-command-manager.test.ts Implement branch list using callbacks from exec function (#1045) 2 years ago
git-directory-helper.test.ts Add 2 test cases for submodule status. 2 years ago
git-version.test.ts Convert checkout to a regular action (#70) 5 years ago
input-helper.test.ts Add set-safe-directory input to allow customers to take control. (#770) 3 years ago
modify-work-tree.sh Convert checkout to a regular action (#70) 5 years ago
override-git-version.cmd Swap to Environment Files (#360) 5 years ago
override-git-version.sh Swap to Environment Files (#360) 5 years ago
ref-helper.test.ts update dev dependencies and react to new linting rules (#611) 4 years ago
retry-helper.test.ts update dev dependencies and react to new linting rules (#611) 4 years ago
verify-basic.sh update default branch (#305) 5 years ago
verify-clean.sh Convert checkout to a regular action (#70) 5 years ago
verify-lfs.sh Convert checkout to a regular action (#70) 5 years ago
verify-no-unstaged-changes.sh update troubleshooting instructions to include 'npm run format' 5 years ago
verify-side-by-side.sh Convert checkout to a regular action (#70) 5 years ago
verify-submodules-false.sh add support for submodules (#173) 5 years ago
verify-submodules-recursive.sh add support for submodules (#173) 5 years ago
verify-submodules-true.sh add support for submodules (#173) 5 years ago