improve vitest hang (#1470)

* improve vitest hang

* fmt

* make types happy

* fix types

* fix
This commit is contained in:
Kurt Hutten
2024-02-21 13:23:50 +11:00
committed by GitHub
parent cbd26d29fa
commit 0d8804005a
6 changed files with 432 additions and 369 deletions

View File

@ -3,6 +3,11 @@ import { WebSocket } from 'ws'
import { vi } from 'vitest'
import 'vitest-webgl-canvas-mock'
import fetch from 'node-fetch'
// @ts-ignore
globalThis.fetch = fetch
class MockRTCPeerConnection {
createDataChannel() {
return