From 82e3ae1523ca6b9013010d9f588213ce4e160403 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Feb 2023 09:21:11 +0100 Subject: Fix CI --- .../lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts | 8 ++++---- server/tests/api/notifications/comments-notifications.ts | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'server') diff --git a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts index b66fa474c..8ed219e9e 100644 --- a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts +++ b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts @@ -1,5 +1,5 @@ import { readdir } from 'fs-extra' -import { constants, PerformanceObserver } from 'perf_hooks' +import { constants, NodeGCPerformanceDetail, PerformanceObserver } from 'perf_hooks' import * as process from 'process' import { Meter, ObservableResult } from '@opentelemetry/api' import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' @@ -110,9 +110,9 @@ export class NodeJSObserversBuilder { // Node < 16 uses entry.kind // Node >= 16 uses entry.detail.kind // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties - const kind = (entry as any).detail - ? kinds[(entry as any).detail.kind] - : kinds[entry.kind] + const kind = entry.detail + ? kinds[(entry.detail as NodeGCPerformanceDetail).kind] + : kinds[(entry as any).kind] // Convert duration from milliseconds to seconds histogram.record(entry.duration / 1000, { diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts index 5a50af040..65007193a 100644 --- a/server/tests/api/notifications/comments-notifications.ts +++ b/server/tests/api/notifications/comments-notifications.ts @@ -18,9 +18,8 @@ describe('Test comments notifications', function () { let emails: object[] = [] const commentText = '**hello** world,

what do you think about peertube?

' - const expectedHtml = 'hello ' + - 'world,

what do you think about peertube?' + const expectedHtml = 'hello world' + + ',

what do you think about peertube?' before(async function () { this.timeout(120000) -- cgit v1.2.3