(overrides = {})
| 7 | const runtimeSource = fs.readFileSync(runtimePath, 'utf8'); |
| 8 | |
| 9 | function loadRuntime(overrides = {}) { |
| 10 | const sandbox = { |
| 11 | console, |
| 12 | globalThis: null, |
| 13 | window: null, |
| 14 | ...overrides |
| 15 | }; |
| 16 | sandbox.globalThis = sandbox; |
| 17 | sandbox.window = sandbox.window || sandbox; |
| 18 | vm.runInNewContext(runtimeSource, sandbox, { filename: runtimePath }); |
| 19 | return sandbox.window.FHDynamicRuntime; |
| 20 | } |
| 21 | |
| 22 | describe('dynamic runtime developer support', () => { |
| 23 | function createNativeFunction(context = {}) { |
no outgoing calls
no test coverage detected