Skip to content

Commit

Permalink
Tests: Make manifest validation error more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
cyraxx committed Jan 2, 2025
1 parent 76c8159 commit 17b20ff
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/asset-reading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,15 @@ describe('Functional Asset Reading Tests', function () {

// Validate the asset with the manifest
validationResult = await manifests.validate(asset);
assert.equal(validationResult.isValid, data.valid);

const message =
data.valid ?
`Manifest should be valid but is not (status codes: ${validationResult.statusEntries
.filter(e => !e.success)
.map(e => e.code)
.join(', ')})`
: 'Manifst is valid but should not be';
assert.equal(validationResult.isValid, data.valid, message);
});

data.statusCodes?.forEach(value => {
Expand Down

0 comments on commit 17b20ff

Please sign in to comment.