mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
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:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user