Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marketionist committed Aug 19, 2024
1 parent 742192a commit 9d83ca9
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tests/links.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
const { checkFile } = require('../index.js');

checkFile(
'./README.md',
[
'https://github.com/Marketionist/img-link-checker/actions',
'https://www.linkedin.com/in/test/'
]
);
(async () => {
const brokenLinks = await checkFile(
'./README.md',
[
'https://github.com/Marketionist/img-link-checker/actions',
'https://www.linkedin.com/in/test/'
]
);

// Print a list of broken links and exit the process (will mark the CI/CD build as failed)
if (brokenLinks.length > 0) {
console.error('Broken links list:', brokenLinks);
process.exit(1);
}
})();

0 comments on commit 9d83ca9

Please sign in to comment.