Get tests passing without engine connection (#155)

We can create a enginelessExecutor that can be used for many of the
executor tests that will be much more performant for tests that don't
need the engine to actually do any modeling work.
This commit is contained in:
Kurt Hutten
2023-07-10 15:15:07 +10:00
committed by GitHub
parent a70399bacf
commit cda301997e
19 changed files with 551 additions and 482 deletions

View File

@ -3,5 +3,21 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom'
import WebSocket from 'ws';
import 'setimmediate'
// @ts-ignore
import wrtc from 'wrtc'
class WebsocketWrapper {
constructor(url: string) {
return new WebSocket(url, {
headers: {
'Autherization': `Bearer ${process.env.KITTYCAD_TOKEN}`,
}
})
}
}
global.RTCPeerConnection = wrtc.RTCPeerConnection
// @ts-ignore
global.WebSocket = WebsocketWrapper