Configurable URL for the API (#205)
* Configurable engine URL Fixes #206 * fix import.meta problem (#210) --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
This commit is contained in:
@ -1,6 +1,17 @@
|
||||
import '@testing-library/jest-dom'
|
||||
import util from 'util'
|
||||
import fetch from 'isomorphic-fetch'
|
||||
import fs from 'fs'
|
||||
|
||||
jest.mock('./env', () => {
|
||||
// and set all the env vars from .env.development
|
||||
const mockVars: { [key: string]: string } = {}
|
||||
fs.readFileSync('.env.development', 'utf8')
|
||||
.split('\n')
|
||||
.map((line) => line.split('='))
|
||||
.forEach(([key, value]) => (mockVars[key] = value))
|
||||
return mockVars
|
||||
})
|
||||
|
||||
class MockRTCPeerConnection {
|
||||
constructor() {}
|
||||
|
Reference in New Issue
Block a user