Files
shields/core/server/in-process-server-test-helpers.js
Paul Melnikow 4bd16f93e8 Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00

24 lines
373 B
JavaScript

'use strict'
const config = require('config').util.toObject()
const Server = require('./server')
function createTestServer({ port }) {
const serverConfig = {
...config,
public: {
...config.public,
bind: {
...config.public.bind,
port,
},
},
}
return new Server(serverConfig)
}
module.exports = {
createTestServer,
}