ci: Fix typing issues in cli tests (no-changelog) (#5227)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-23 17:41:55 +01:00
committed by GitHub
parent 96dddf12e1
commit bd14ec1110
3 changed files with 11 additions and 10 deletions

View File

@@ -100,9 +100,9 @@ test('should not report webhooks having basic or header auth', async () => {
await Promise.all(promises);
const testAudit = await audit(['instance']);
if (Array.isArray(testAudit)) fail('audit is empty');
const report = testAudit?.[toReportTitle('instance')];
const report = testAudit[toReportTitle('instance')];
if (!report) {
fail('Expected test audit to have instance risk report');
}
@@ -160,9 +160,9 @@ test('should not report webhooks validated by direct children', async () => {
await Promise.all(promises);
const testAudit = await audit(['instance']);
if (Array.isArray(testAudit)) fail('audit is empty');
const report = testAudit?.[toReportTitle('instance')];
const report = testAudit[toReportTitle('instance')];
if (!report) {
fail('Expected test audit to have instance risk report');
}
@@ -176,8 +176,9 @@ test('should not report non-webhook node', async () => {
await saveManualTriggerWorkflow();
const testAudit = await audit(['instance']);
if (Array.isArray(testAudit)) fail('audit is empty');
const report = testAudit?.[toReportTitle('instance')];
const report = testAudit[toReportTitle('instance')];
if (!report) {
fail('Expected test audit to have instance risk report');
@@ -210,9 +211,9 @@ test('should report outdated instance when outdated', async () => {
test('should not report outdated instance when up to date', async () => {
const testAudit = await audit(['instance']);
if (Array.isArray(testAudit)) fail('audit is empty');
const report = testAudit?.[toReportTitle('instance')];
const report = testAudit[toReportTitle('instance')];
if (!report) {
fail('Expected test audit to have instance risk report');
}