This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

33
node_modules/process-warning/test/issue-88.test.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
'use strict'
const { test } = require('tap')
const { createWarning } = require('..')
test('Must not overwrite config', t => {
t.plan(1)
function onWarning (warning) {
t.equal(warning.code, 'CODE_1')
}
const a = createWarning({
name: 'TestWarning',
code: 'CODE_1',
message: 'Msg'
})
createWarning({
name: 'TestWarning',
code: 'CODE_2',
message: 'Msg',
unlimited: true
})
process.on('warning', onWarning)
a('CODE_1')
a('CODE_1')
setImmediate(() => {
process.removeListener('warning', onWarning)
t.end()
})
})