MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / testESMImport

Function testESMImport

test/test-helpers.mjs:26–41  ·  view source on GitHub ↗
(modulePath)

Source from the content-addressed store, hash-verified

24
25// Utility to test ESM import functionality
26export async function testESMImport (modulePath) {
27 try {
28 const module = await import(modulePath)
29 return {
30 success: true,
31 module,
32 hasDefault: 'default' in module,
33 namedExports: Object.keys(module).filter(key => key !== 'default')
34 }
35 } catch (error) {
36 return {
37 success: false,
38 error: error.message
39 }
40 }
41}
42
43// Performance measurement utilities
44export class PerformanceTimer {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected