(modulePromise)
| 2 | |
| 3 | it("should load node builtins via dynamic import", async () => { |
| 4 | const load = async (modulePromise) => { |
| 5 | const imported = await modulePromise; |
| 6 | return imported.default || imported; |
| 7 | }; |
| 8 | const expectIfAvailable = (imported, fn) => { |
| 9 | if (imported) fn(imported); |
| 10 | }; |