mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 21:48:48 +08:00
test(server): add MockJobQueue (#11032)
This commit is contained in:
@@ -5,6 +5,7 @@ import type { TestFn } from 'ava';
|
||||
import ava from 'ava';
|
||||
import Sinon from 'sinon';
|
||||
|
||||
import { JobQueue } from '../base';
|
||||
import { ConfigModule } from '../base/config';
|
||||
import { AuthService } from '../core/auth';
|
||||
import { WorkspaceModule } from '../core/workspaces';
|
||||
@@ -88,6 +89,10 @@ test.before(async t => {
|
||||
WorkspaceModule,
|
||||
CopilotModule,
|
||||
],
|
||||
tapModule: m => {
|
||||
// use real JobQueue for testing
|
||||
m.overrideProvider(JobQueue).useClass(JobQueue);
|
||||
},
|
||||
});
|
||||
|
||||
const auth = app.get(AuthService);
|
||||
|
||||
Reference in New Issue
Block a user