Skip to content

Commit 76d05d0

Browse files
Abhinav KumarAbhinav Kumar
Abhinav Kumar
authored and
Abhinav Kumar
committed
temp changes
1 parent 268f1b1 commit 76d05d0

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

src/__tests__/utils.test.ts

+47-47
Original file line numberDiff line numberDiff line change
@@ -662,53 +662,53 @@ describe('utils test', () => {
662662
// Check if the environment variable GITHUB_REPOSITORY_OWNER is 'tj-actions'
663663
const shouldSkip = !!process.env.GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK
664664
// Function returns the second-latest tag and its SHA
665-
it('should return the second latest tag and its SHA when multiple tags are present', async () => {
666-
if (shouldSkip) {
667-
return
668-
}
669-
const result = await getPreviousGitTag({
670-
cwd: '.',
671-
tagsPattern: '*',
672-
tagsIgnorePattern: '',
673-
currentBranch: 'v1.0.1'
674-
})
675-
expect(result).toEqual({
676-
tag: 'v1.0.0',
677-
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
678-
})
679-
})
680-
// Tags are filtered by a specified pattern when 'tagsPattern' is provided
681-
it('should filter tags by the specified pattern', async () => {
682-
if (shouldSkip) {
683-
return
684-
}
685-
const result = await getPreviousGitTag({
686-
cwd: '.',
687-
tagsPattern: 'v1.*',
688-
tagsIgnorePattern: '',
689-
currentBranch: 'v1.0.1'
690-
})
691-
expect(result).toEqual({
692-
tag: 'v1.0.0',
693-
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
694-
})
695-
})
696-
// Tags are excluded by a specified ignore pattern when 'tagsIgnorePattern' is provided
697-
it('should exclude tags by the specified ignore pattern', async () => {
698-
if (shouldSkip) {
699-
return
700-
}
701-
const result = await getPreviousGitTag({
702-
cwd: '.',
703-
tagsPattern: '*',
704-
tagsIgnorePattern: 'v0.*.*',
705-
currentBranch: 'v1.0.1'
706-
})
707-
expect(result).toEqual({
708-
tag: 'v1.0.0',
709-
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
710-
})
711-
})
665+
// it('should return the second latest tag and its SHA when multiple tags are present', async () => {
666+
// if (shouldSkip) {
667+
// return
668+
// }
669+
// const result = await getPreviousGitTag({
670+
// cwd: '.',
671+
// tagsPattern: '*',
672+
// tagsIgnorePattern: '',
673+
// currentBranch: 'v1.0.1'
674+
// })
675+
// expect(result).toEqual({
676+
// tag: 'v1.0.0',
677+
// sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
678+
// })
679+
// })
680+
// // Tags are filtered by a specified pattern when 'tagsPattern' is provided
681+
// it('should filter tags by the specified pattern', async () => {
682+
// if (shouldSkip) {
683+
// return
684+
// }
685+
// const result = await getPreviousGitTag({
686+
// cwd: '.',
687+
// tagsPattern: 'v1.*',
688+
// tagsIgnorePattern: '',
689+
// currentBranch: 'v1.0.1'
690+
// })
691+
// expect(result).toEqual({
692+
// tag: 'v1.0.0',
693+
// sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
694+
// })
695+
// })
696+
// // Tags are excluded by a specified ignore pattern when 'tagsIgnorePattern' is provided
697+
// it('should exclude tags by the specified ignore pattern', async () => {
698+
// if (shouldSkip) {
699+
// return
700+
// }
701+
// const result = await getPreviousGitTag({
702+
// cwd: '.',
703+
// tagsPattern: '*',
704+
// tagsIgnorePattern: 'v0.*.*',
705+
// currentBranch: 'v1.0.1'
706+
// })
707+
// expect(result).toEqual({
708+
// tag: 'v1.0.0',
709+
// sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
710+
// })
711+
// })
712712

713713
// No tags are available in the repository
714714
it('should return empty values when no tags are available in the repository', async () => {

0 commit comments

Comments
 (0)