mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 13:36:07 +02:00
test: wait after post request
This commit is contained in:
@@ -128,7 +128,7 @@ describe('Analytics', () => {
|
|||||||
let counters;
|
let counters;
|
||||||
({ counters } = analytics.peek());
|
({ counters } = analytics.peek());
|
||||||
const before = { ...counters };
|
const before = { ...counters };
|
||||||
|
const { setTimeout } = require('timers/promises');
|
||||||
const id = `https://example.org/activity/${utils.generateUUID()}`;
|
const id = `https://example.org/activity/${utils.generateUUID()}`;
|
||||||
await controllers.activitypub.postInbox({
|
await controllers.activitypub.postInbox({
|
||||||
body: {
|
body: {
|
||||||
@@ -141,7 +141,7 @@ describe('Analytics', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, { sendStatus: () => {} });
|
}, { sendStatus: () => {} });
|
||||||
|
await setTimeout(2000);
|
||||||
({ counters } = analytics.peek());
|
({ counters } = analytics.peek());
|
||||||
const after = { ...counters };
|
const after = { ...counters };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user