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

Function createTestServer

test/test-helpers.mjs:10–23  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

8
9// Utility to create test servers with ESM modules
10export async function createTestServer (options = {}) {
11 const { default: createApp } = await import('../index.mjs')
12
13 const defaultOptions = {
14 port: 0, // Random port
15 serverUri: 'https://localhost',
16 webid: true,
17 multiuser: false,
18 ...options
19 }
20
21 const app = createApp(defaultOptions)
22 return app
23}
24
25// Utility to test ESM import functionality
26export async function testESMImport (modulePath) {

Callers

nothing calls this directly

Calls 1

createAppFunction · 0.85

Tested by

no test coverage detected