(context)
| 618 | }; |
| 619 | |
| 620 | const create262Host = (context) => ({ |
| 621 | evalScript(code, options = {}) { |
| 622 | return vm.runInContext(code, context, options); |
| 623 | }, |
| 624 | createRealm() { |
| 625 | const newSandbox = vm.runInNewContext("this"); |
| 626 | const newContext = vm.createContext(newSandbox); |
| 627 | const newHost = create262Host(newContext); |
| 628 | |
| 629 | newHost.global = newContext; |
| 630 | |
| 631 | return newHost; |
| 632 | } |
| 633 | }); |
| 634 | |
| 635 | const createImportModuleDynamically = |
| 636 | (context, testFile, moduleCache) => async (specifier, referencing) => { |
no outgoing calls
no test coverage detected