1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 07:25:49 +02:00

refactor: ファイルアップロード時のテストを追加 (#15928)

* refactor: ファイルアップロード時のテストを追加

* なぜかsemverが消えてた
This commit is contained in:
おさむのひと
2025-05-04 09:38:35 +09:00
committed by GitHub
parent 590cb5f4dd
commit 8c0c503c6c
5 changed files with 304 additions and 32 deletions

View File

@@ -7,7 +7,7 @@ import cluster from 'node:cluster';
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import Fastify, { FastifyInstance } from 'fastify';
import Fastify, { type FastifyInstance } from 'fastify';
import fastifyStatic from '@fastify/static';
import fastifyRawBody from 'fastify-raw-body';
import { IsNull } from 'typeorm';
@@ -309,6 +309,13 @@ export class ServerService implements OnApplicationShutdown {
await this.#fastify.close();
}
/**
* Get the Fastify instance for testing.
*/
public get fastify(): FastifyInstance {
return this.#fastify;
}
@bindThis
async onApplicationShutdown(signal: string): Promise<void> {
await this.dispose();