remove NestJS instance from ApMfmService.ts tests
This commit is contained in:
parent
1e04b20b6b
commit
d3ac7598b7
1 changed files with 10 additions and 16 deletions
|
|
@ -4,27 +4,21 @@
|
|||
*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
|
||||
import { CoreModule } from '@/core/CoreModule.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { ApMfmService } from '@/core/activitypub/ApMfmService.js';
|
||||
import { GlobalModule } from '@/GlobalModule.js';
|
||||
import { MiNote } from '@/models/Note.js';
|
||||
import { MfmService } from '@/core/MfmService.js';
|
||||
|
||||
describe('ApMfmService', () => {
|
||||
let app: TestingModule;
|
||||
let config: Config;
|
||||
let mfmService: MfmService;
|
||||
let apMfmService: ApMfmService;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await Test.createTestingModule({
|
||||
imports: [GlobalModule, CoreModule],
|
||||
}).compile();
|
||||
app.enableShutdownHooks();
|
||||
apMfmService = app.get<ApMfmService>(ApMfmService);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
beforeEach(() => {
|
||||
config = {
|
||||
url: 'http://misskey.local',
|
||||
} as unknown as Config;
|
||||
mfmService = new MfmService(config);
|
||||
apMfmService = new ApMfmService(mfmService);
|
||||
});
|
||||
|
||||
describe('getNoteHtml', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue