Skip to content

Commit 23ca237

Browse files
authored
test: Removed t.diagnostic from tests (#2858)
1 parent d2fba9d commit 23ca237

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

test/integration/distributed-tracing/trace-context-cross-agent.test.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,6 @@ async function runTestCase(testCase, parentTest) {
326326
})
327327

328328
await parentTest.test('trace context: ' + testCase.test_name, (t, end) => {
329-
if (testCase.comment && testCase.comment.length > 0) {
330-
const comment = Array.isArray(testCase.comment)
331-
? testCase.comment.join('\n')
332-
: testCase.comment
333-
334-
t.diagnostic(comment)
335-
}
336-
337329
const agent = helper.instrumentMockedAgent({})
338330
agent.recordSupportability = recordSupportability
339331
agent.config.trusted_account_key = testCase.trusted_account_key

test/integration/uninstrumented/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@
2424
"restify": "*",
2525
"superagent": "*",
2626
"when": "*"
27+
},
28+
"engines": {
29+
"node": ">=18"
2730
}
2831
}

test/integration/uninstrumented/uninstrumented.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test('all instrumented modules should be detected when uninstrumented', (t, end)
6060
require(module)
6161
loaded.push(module)
6262
} catch {
63-
t.diagnostic('failed to load ' + module)
63+
// silently fail
6464
}
6565
}
6666
})

test/lib/temp-override-uncaught.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ const oldListeners = {
3434
*/
3535
function tempOverrideUncaught({ t, handler, type = EXCEPTION }) {
3636
if (!handler) {
37-
handler = function uncaughtTestHandler() {
38-
t.diagnostic('uncaught handler not defined')
39-
}
37+
handler = function uncaughtTestHandler() {}
4038
}
4139

4240
oldListeners[type] = process.listeners(type)

test/lib/temp-remove-listeners.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*/
2020
module.exports = function tempRemoveListeners({ t, emitter, event }) {
2121
if (!emitter) {
22-
t.diagnostic(`Not removing ${event} listeners, emitter does not exist`)
2322
return
2423
}
2524

test/unit/collector/facts.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ test('display_host facts', async (t) => {
730730
await t.test('should be ipv6 when ipv_preference === 6', (t, end) => {
731731
const { agent, facts } = t.nr
732732
if (!agent.config.getIPAddresses().ipv6) {
733-
t.diagnostic('this machine does not have an ipv6 address, skipping')
734733
end()
735734
}
736735

@@ -753,7 +752,6 @@ test('display_host facts', async (t) => {
753752
await t.test('returns no ipv4, hostname should be ipv6 if possible', (t, end) => {
754753
const { agent, facts } = t.nr
755754
if (!agent.config.getIPAddresses().ipv6) {
756-
t.diagnostic('this machine does not have an ipv6 address, skipping')
757755
end()
758756
}
759757

0 commit comments

Comments
 (0)