diff --git a/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts b/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts index aeb182c4794e6..835cf799b60f2 100644 --- a/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts +++ b/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts @@ -127,7 +127,9 @@ describe('unrecognized task types', () => { if (errorLogCalls) { // should be no workload aggregator errors for (const elog of errorLogCalls) { - expect(elog).not.toMatch(/^\[WorkloadAggregator\]: Error: Unsupported task type/i); + if (typeof elog === 'string') { + expect(elog).not.toMatch(/^\[WorkloadAggregator\]: Error: Unsupported task type/i); + } } } });