feat(tests): add Jest configuration and comprehensive tests for utility functions in index.js to ensure functionality and reliability

chore(package): update @actions/github dependency to version 6.0.1 and add Jest as a dev dependency with a test script
This commit is contained in:
SethCohen
2025-06-17 02:47:56 -04:00
parent de60879a86
commit 0559b87ee8
5 changed files with 7905 additions and 250 deletions
+14 -1
View File
@@ -99,7 +99,7 @@ const formatDescription = (description) => {
let edit = removeCarriageReturn(description);
edit = removeHTMLComments(edit);
edit = reduceNewlines(edit);
if (core.getBooleanInput('remove_github_reference_links')) {
edit = removeGithubReferenceLinks(edit);
}
@@ -276,3 +276,16 @@ const run = async () => {
run()
.then(() => core.info('Action completed successfully'))
.catch(err => core.setFailed(err.message));
// Export utility functions for testing
export {
removeCarriageReturn,
removeHTMLComments,
reduceNewlines,
convertMentionsToLinks,
removeGithubReferenceLinks,
reduceHeadings,
convertLinksToMarkdown,
limitString,
formatDescription
};