mirror of
https://github.com/coder/code-server.git
synced 2025-07-29 21:12:58 +08:00
test: Switch from leaked-handles to wtfnode (#2604)
See my comments at https://github.com/cdr/code-server/pull/2563#issuecomment-763394741
This commit is contained in:
19
test/wtfnode.ts
Normal file
19
test/wtfnode.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import * as wtfnode from "wtfnode"
|
||||
|
||||
let active = false
|
||||
|
||||
export function setup(): void {
|
||||
if (active) {
|
||||
return
|
||||
}
|
||||
active = true
|
||||
|
||||
const interval = 5000
|
||||
const wtfnodeDump = () => {
|
||||
wtfnode.dump()
|
||||
const t = setTimeout(wtfnodeDump, interval)
|
||||
t.unref()
|
||||
}
|
||||
const t = setTimeout(wtfnodeDump, interval)
|
||||
t.unref()
|
||||
}
|
Reference in New Issue
Block a user