mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
ci: Fix typing issues in cli tests (no-changelog) (#5227)
This commit is contained in:
parent
96dddf12e1
commit
bd14ec1110
|
@ -100,9 +100,9 @@ test('should not report webhooks having basic or header auth', async () => {
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
const testAudit = await audit(['instance']);
|
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) {
|
if (!report) {
|
||||||
fail('Expected test audit to have instance risk 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);
|
await Promise.all(promises);
|
||||||
|
|
||||||
const testAudit = await audit(['instance']);
|
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) {
|
if (!report) {
|
||||||
fail('Expected test audit to have instance risk report');
|
fail('Expected test audit to have instance risk report');
|
||||||
}
|
}
|
||||||
|
@ -176,8 +176,9 @@ test('should not report non-webhook node', async () => {
|
||||||
await saveManualTriggerWorkflow();
|
await saveManualTriggerWorkflow();
|
||||||
|
|
||||||
const testAudit = await audit(['instance']);
|
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) {
|
if (!report) {
|
||||||
fail('Expected test audit to have instance risk 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 () => {
|
test('should not report outdated instance when up to date', async () => {
|
||||||
const testAudit = await audit(['instance']);
|
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) {
|
if (!report) {
|
||||||
fail('Expected test audit to have instance risk report');
|
fail('Expected test audit to have instance risk report');
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,9 +67,9 @@ test('should not report non-risky official nodes', async () => {
|
||||||
await saveManualTriggerWorkflow();
|
await saveManualTriggerWorkflow();
|
||||||
|
|
||||||
const testAudit = await audit(['nodes']);
|
const testAudit = await audit(['nodes']);
|
||||||
|
if (Array.isArray(testAudit)) return;
|
||||||
|
|
||||||
const report = testAudit?.[toReportTitle('nodes')];
|
const report = testAudit[toReportTitle('nodes')];
|
||||||
|
|
||||||
if (!report) return;
|
if (!report) return;
|
||||||
|
|
||||||
for (const section of report.sections) {
|
for (const section of report.sections) {
|
||||||
|
|
|
@ -367,7 +367,7 @@ test('should send message to sentry ', async () => {
|
||||||
|
|
||||||
sentryDestination.enable();
|
sentryDestination.enable();
|
||||||
|
|
||||||
const mockedSentryCaptureMessage = jest.spyOn(sentryDestination.sentryClient, 'captureMessage');
|
const mockedSentryCaptureMessage = jest.spyOn(sentryDestination.sentryClient!, 'captureMessage');
|
||||||
mockedSentryCaptureMessage.mockImplementation((_m, _level, _hint, _scope) => {
|
mockedSentryCaptureMessage.mockImplementation((_m, _level, _hint, _scope) => {
|
||||||
eventBus.confirmSent(testMessage, {
|
eventBus.confirmSent(testMessage, {
|
||||||
id: sentryDestination.id,
|
id: sentryDestination.id,
|
||||||
|
|
Loading…
Reference in a new issue