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:
Anmol Sethi
2021-02-01 11:06:49 -05:00
committed by GitHub
parent 5446e0ad43
commit d7f06975a6
4 changed files with 34 additions and 1 deletions

19
test/wtfnode.ts Normal file
View 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()
}