refactor: ファイルアップロード時のテストを追加 (#15928)
* refactor: ファイルアップロード時のテストを追加 * なぜかsemverが消えてた
This commit is contained in:
parent
b91a67d74e
commit
e40f3917f3
5 changed files with 274 additions and 2 deletions
|
|
@ -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';
|
||||
|
|
@ -312,6 +312,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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue