First commit

This commit is contained in:
2026-01-12 13:12:46 +01:00
parent b2d9501f6d
commit a1fbd8acf5
4413 changed files with 1245183 additions and 0 deletions

30
node_modules/on-exit-leak-free/test/base.test.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
'use strict'
const { test } = require('tap')
const { fork } = require('child_process')
const { join } = require('path')
const { once } = require('events')
const { register } = require('..')
const files = [
'close.js',
'beforeExit',
'gc-not-close.js',
'unregister.js'
]
for (const file of files) {
test(file, async ({ equal }) => {
const child = fork(join(__dirname, 'fixtures', file), [], {
execArgv: ['--expose-gc']
})
const [code] = await once(child, 'close')
equal(code, 0)
})
}
test('undefined', async ({ throws }) => {
throws(() => register(undefined))
})