Skip to content

Commit

Permalink
feat: enrich message
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyreilly committed Jan 1, 2024
1 parent 88d44b1 commit e3fa69d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34994,7 +34994,8 @@ function processValidationResult(validationResult) {
}
return {
success: true,
resultText: `Validated ${validationResult.url}!`,
resultText: `${validationResult.url} has structured data of these types:
${validationResult.tripleGroups.map((group) => ` - ${group.type}`).join("\n")}`,
};
}

Expand Down
2 changes: 1 addition & 1 deletion dist/validate.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function processValidationResult(

return {
success: true,
resultText: `Validated ${validationResult.url}!`,
resultText: `${validationResult.url} has structured data of these types:
${validationResult.tripleGroups.map((group) => ` - ${group.type}`).join("\n")}`,
};
}
3 changes: 2 additions & 1 deletion test/__snapshots__/validate.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ exports[`processValidationResult > given no structured data returns unsuccessful

exports[`processValidationResult > given valid schema without errors / warnings returns successfully 1`] = `
{
"resultText": "Validated https://deploy-preview-9669--docusaurus-2.netlify.app/blog/releases/2.4/!",
"resultText": "https://deploy-preview-9669--docusaurus-2.netlify.app/blog/releases/2.4/ has structured data of these types:
- BlogPosting",
"success": true,
}
`;
Expand Down

0 comments on commit e3fa69d

Please sign in to comment.