Skip to content

Commit

Permalink
Add docsLink for groupedValidation results
Browse files Browse the repository at this point in the history
  • Loading branch information
khmyznikov committed Aug 11, 2023
1 parent cf63197 commit bb250d1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libraries/manifest-validation/package-lock.json

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

2 changes: 1 addition & 1 deletion libraries/manifest-validation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pwabuilder/manifest-validation",
"version": "0.0.8",
"version": "0.0.9",
"author": "pwa-builder",
"license": "ISC",
"description": "Manifest validation library by PWABuilder criteria",
Expand Down
2 changes: 1 addition & 1 deletion libraries/manifest-validation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function groupedValidation(manifest: Manifest): Promise<TokensValid
currentManifest = manifest;
const testResults = await loopThroughKeys(manifest, false, true);
const resultsGrouped = testResults.reduce((acc, curr) => {
const curTrimmed = { category: curr.category, member: curr.member, valid: curr.valid, displayString: curr.displayString, errorString: curr.errorString, infoString: curr.infoString };
const curTrimmed = { category: curr.category, member: curr.member, valid: curr.valid, displayString: curr.displayString, errorString: curr.errorString, infoString: curr.infoString, docsLink: curr.docsLink };
if (acc[curr.member]) {
acc[curr.member].push(curTrimmed);
} else {
Expand Down
1 change: 1 addition & 0 deletions libraries/manifest-validation/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type PartialValidation = {
displayString?: string;
errorString?: string;
infoString?: string;
docsLink?: string;
valid: boolean;
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/manifest-validation/test/validation-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('Manifest Validation with hardcoded test manifest', async () => {
});

// should fail because of missing 96x96 icon
it('Can validate the inner structure of shortcuts, should fail', async () => {
it('Can validate the inner structure of shortcuts', async () => {
const validity = await maniLib.validateSingleField("shortcuts", [
{
"name": "Start Live Session",
Expand All @@ -103,7 +103,7 @@ describe('Manifest Validation with hardcoded test manifest', async () => {
}
]);

assert.equal(validity.valid, false);
assert.equal(validity.valid, true);
});

it('start_url is within app scope, should pass', async () => {
Expand Down

0 comments on commit bb250d1

Please sign in to comment.