()
| 679 | return Promise.resolve(esm); |
| 680 | |
| 681 | const link = async () => { |
| 682 | await esm.link( |
| 683 | async (specifier, referencingModule) => |
| 684 | // `linker` should return `vm.SourceTextModule` |
| 685 | await asModule( |
| 686 | await this.require( |
| 687 | path.dirname( |
| 688 | referencingModule.identifier || |
| 689 | fileURLToPath( |
| 690 | /** @type {string} */ ( |
| 691 | /** @type {EXPECTED_ANY} */ (referencingModule).url |
| 692 | ) |
| 693 | ) |
| 694 | ), |
| 695 | specifier, |
| 696 | { esmReturnStatus: ESModuleStatus.Unlinked } |
| 697 | ), |
| 698 | referencingModule.context, |
| 699 | { |
| 700 | esmReturnStatus: ESModuleStatus.Unlinked |
| 701 | } |
| 702 | ) |
| 703 | ); |
| 704 | }; |
| 705 | |
| 706 | const run = async () => { |
| 707 | // Link module dependencies |
no test coverage detected