diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-11-29 19:55:52 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-11-29 19:55:52 +0900 |
| commit | 2effd9da6ea6bd24b4a8342ded6d5b05b69a5ed4 (patch) | |
| tree | e81d8c3181f1a967a021151aec1c6fa183c34e9b /packages/backend/test | |
| parent | perf(backend): jsdom、happy-domをやめて軽量な実装にし、メモリ... (diff) | |
| download | misskey-2effd9da6ea6bd24b4a8342ded6d5b05b69a5ed4.tar.gz misskey-2effd9da6ea6bd24b4a8342ded6d5b05b69a5ed4.tar.bz2 misskey-2effd9da6ea6bd24b4a8342ded6d5b05b69a5ed4.zip | |
chore(backend): remove jsdom
Diffstat (limited to 'packages/backend/test')
| -rw-r--r-- | packages/backend/test/utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index daae7b9643..16d899baef 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -10,8 +10,8 @@ import { randomUUID } from 'node:crypto'; import { inspect } from 'node:util'; import WebSocket, { ClientOptions } from 'ws'; import fetch, { File, RequestInit, type Headers } from 'node-fetch'; +import * as htmlParser from 'node-html-parser'; import { DataSource } from 'typeorm'; -import { JSDOM } from 'jsdom'; import { type Response } from 'node-fetch'; import Fastify from 'fastify'; import { entities } from '../src/postgres.js'; @@ -468,7 +468,7 @@ export function makeStreamCatcher<T>( export type SimpleGetResponse = { status: number, - body: any | JSDOM | null, + body: any | htmlParser.HTMLElement | null, type: string | null, location: string | null }; @@ -499,7 +499,7 @@ export const simpleGet = async (path: string, accept = '*/*', cookie: any = unde const body = jsonTypes.includes(res.headers.get('content-type') ?? '') ? await res.json() : - htmlTypes.includes(res.headers.get('content-type') ?? '') ? new JSDOM(await res.text()) : + htmlTypes.includes(res.headers.get('content-type') ?? '') ? htmlParser.parse(await res.text()) : await bodyExtractor(res); return { |