Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -1,13 +1,14 @@
'use strict'
const { test } = require('tap')
const { test } = require('node:test')
const { createWarning } = require('..')
const { withResolvers } = require('./promise')
test('Must not overwrite config', t => {
t.plan(1)
function onWarning (warning) {
t.equal(warning.code, 'CODE_1')
t.assert.deepStrictEqual(warning.code, 'CODE_1')
}
const a = createWarning({
@@ -22,12 +23,16 @@ test('Must not overwrite config', t => {
unlimited: true
})
const { promise, resolve } = withResolvers()
process.on('warning', onWarning)
a('CODE_1')
a('CODE_1')
setImmediate(() => {
process.removeListener('warning', onWarning)
t.end()
resolve()
})
return promise
})