aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/middleware/mastodon.spec.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-10-21 07:10:20 +0300
committerGravatar Vitaly Takmazov2024-10-21 07:10:20 +0300
commitdd962bcb1ebcbff9dd28ada9156786b9a9ed92a6 (patch)
tree167b3b30a4eea520c7fbd7da6bb15c2847ecc3cb /vnext/server/middleware/mastodon.spec.js
parentca6c011351afe7c3be5b1ab8b5cf87db10514263 (diff)
vnext: Use actual express app for tests
* use `debug` for sequelize logging
Diffstat (limited to 'vnext/server/middleware/mastodon.spec.js')
-rw-r--r--vnext/server/middleware/mastodon.spec.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/vnext/server/middleware/mastodon.spec.js b/vnext/server/middleware/mastodon.spec.js
index 648923e4..561303bc 100644
--- a/vnext/server/middleware/mastodon.spec.js
+++ b/vnext/server/middleware/mastodon.spec.js
@@ -1,14 +1,10 @@
import request from 'supertest'
-import express from 'express'
-import { instance } from './mastodon'
-
-const app = express()
-app.get('/instance', instance)
+import { app } from '../app'
describe('Mastodon API middleware', () => {
it('Inactive users should not be included in Instance response', async () => {
return request(app)
- .get('/instance')
+ .get('/api/v2/instance')
.expect(200)
.then(response => {
expect(response.body.usage.users.active_month).toStrictEqual(1)