(
context,
code,
identifier,
testFile,
moduleCache,
options = {}
)
| 683 | }; |
| 684 | |
| 685 | const runScript = async ( |
| 686 | context, |
| 687 | code, |
| 688 | identifier, |
| 689 | testFile, |
| 690 | moduleCache, |
| 691 | options = {} |
| 692 | ) => { |
| 693 | const script = new vm.Script(code, { |
| 694 | filename: identifier, |
| 695 | lineOffset: options.lineOffset || 0, |
| 696 | columnOffset: options.columnOffset || 0, |
| 697 | importModuleDynamically: createImportModuleDynamically( |
| 698 | context, |
| 699 | testFile, |
| 700 | moduleCache |
| 701 | ) |
| 702 | }); |
| 703 | |
| 704 | script.runInContext(context, { |
| 705 | displayErrors: true |
| 706 | }); |
| 707 | |
| 708 | await new Promise((resolve) => { |
| 709 | setImmediate(resolve); |
| 710 | }); |
| 711 | }; |
| 712 | |
| 713 | const baseDir = path.posix.resolve(test262Dir, "./test/language/"); |
| 714 |
no test coverage detected