aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-17 09:21:11 +0100
committerChocobozzz <me@florianbigard.com>2023-02-17 09:21:11 +0100
commit82e3ae1523ca6b9013010d9f588213ce4e160403 (patch)
tree3bf01ecc873a1595bb0d3ee9da449c2442d29b09 /server
parentf11d8a838099f5d9a67759820d57d0da294377fe (diff)
downloadPeerTube-82e3ae1523ca6b9013010d9f588213ce4e160403.tar.gz
PeerTube-82e3ae1523ca6b9013010d9f588213ce4e160403.tar.zst
PeerTube-82e3ae1523ca6b9013010d9f588213ce4e160403.zip
Fix CI
Diffstat (limited to 'server')
-rw-r--r--server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts8
-rw-r--r--server/tests/api/notifications/comments-notifications.ts5
2 files changed, 6 insertions, 7 deletions
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 @@
1import { readdir } from 'fs-extra' 1import { readdir } from 'fs-extra'
2import { constants, PerformanceObserver } from 'perf_hooks' 2import { constants, NodeGCPerformanceDetail, PerformanceObserver } from 'perf_hooks'
3import * as process from 'process' 3import * as process from 'process'
4import { Meter, ObservableResult } from '@opentelemetry/api' 4import { Meter, ObservableResult } from '@opentelemetry/api'
5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' 5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics'
@@ -110,9 +110,9 @@ export class NodeJSObserversBuilder {
110 // Node < 16 uses entry.kind 110 // Node < 16 uses entry.kind
111 // Node >= 16 uses entry.detail.kind 111 // Node >= 16 uses entry.detail.kind
112 // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties 112 // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties
113 const kind = (entry as any).detail 113 const kind = entry.detail
114 ? kinds[(entry as any).detail.kind] 114 ? kinds[(entry.detail as NodeGCPerformanceDetail).kind]
115 : kinds[entry.kind] 115 : kinds[(entry as any).kind]
116 116
117 // Convert duration from milliseconds to seconds 117 // Convert duration from milliseconds to seconds
118 histogram.record(entry.duration / 1000, { 118 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 () {
18 let emails: object[] = [] 18 let emails: object[] = []
19 19
20 const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>' 20 const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>'
21 const expectedHtml = '<strong style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">hello</strong> ' + 21 const expectedHtml = '<strong>hello</strong> <a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer">world</a>' +
22 '<a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer" style="-ms-text-size-adjust: 100%; ' + 22 ', </p>what do you think about peertube?'
23 '-webkit-text-size-adjust: 100%; text-decoration: none; color: #f2690d;">world</a>, </p>what do you think about peertube?'
24 23
25 before(async function () { 24 before(async function () {
26 this.timeout(120000) 25 this.timeout(120000)