mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
#1391: flag validation errors and warnings as test failures
This commit is contained in:
parent
40b7d2c6e4
commit
6c107344aa
@ -54,7 +54,7 @@ test('the generated OpenAPI spec is valid', async () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [openapi, error, warning] = await enforcer(body, {
|
const [, error, warning] = await enforcer(body, {
|
||||||
fullResult: true,
|
fullResult: true,
|
||||||
componentOptions: {
|
componentOptions: {
|
||||||
exceptionSkipCodes: [
|
exceptionSkipCodes: [
|
||||||
@ -63,12 +63,12 @@ test('the generated OpenAPI spec is valid', async () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (warning !== undefined) {
|
||||||
|
console.warn(warning);
|
||||||
|
}
|
||||||
if (error !== undefined) {
|
if (error !== undefined) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
if (warning !== undefined) {
|
|
||||||
// some of these _should_ probably be dealt with at some point.
|
expect(warning ?? error).toBe(undefined);
|
||||||
console.warn(warning);
|
|
||||||
}
|
|
||||||
if (openapi !== undefined) console.log('Document is valid');
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user