aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/server
diff options
context:
space:
mode:
Diffstat (limited to 'shared/utils/server')
-rw-r--r--shared/utils/server/activitypub.ts5
-rw-r--r--shared/utils/server/servers.ts2
2 files changed, 3 insertions, 4 deletions
diff --git a/shared/utils/server/activitypub.ts b/shared/utils/server/activitypub.ts
index cf3c1c3b3..eccb198ca 100644
--- a/shared/utils/server/activitypub.ts
+++ b/shared/utils/server/activitypub.ts
@@ -1,11 +1,10 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3function makeActivityPubGetRequest (url: string, path: string) { 3function makeActivityPubGetRequest (url: string, path: string, expectedStatus = 200) {
4 return request(url) 4 return request(url)
5 .get(path) 5 .get(path)
6 .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8') 6 .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8')
7 .expect(200) 7 .expect(expectedStatus)
8 .expect('Content-Type', /json/)
9} 8}
10 9
11// --------------------------------------------------------------------------- 10// ---------------------------------------------------------------------------
diff --git a/shared/utils/server/servers.ts b/shared/utils/server/servers.ts
index f358a21f1..88d2b390c 100644
--- a/shared/utils/server/servers.ts
+++ b/shared/utils/server/servers.ts
@@ -115,7 +115,7 @@ function runServer (serverNumber: number, configOverride?: Object, args = []) {
115 } 115 }
116 116
117 return new Promise<ServerInfo>(res => { 117 return new Promise<ServerInfo>(res => {
118 server.app = fork(join(__dirname, '..', '..', '..', '..', 'dist', 'server.js'), args, options) 118 server.app = fork(join(root(), 'dist', 'server.js'), args, options)
119 server.app.stdout.on('data', function onStdout (data) { 119 server.app.stdout.on('data', function onStdout (data) {
120 let dontContinue = false 120 let dontContinue = false
121 121