From b5c319b2c716fd383b99f203b5d05106e21936a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Sat, 16 Dec 2023 08:56:26 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20test=E3=81=8C=E8=90=BD?= =?UTF-8?q?=E3=81=A1=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1267?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/package.json | 5 +++-- packages/frontend/test/home.test.ts | 5 +++-- pnpm-lock.yaml | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 4cf477956..4d0139f25 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -26,8 +26,8 @@ "@tabler/icons-webfont": "2.44.0", "@vitejs/plugin-vue": "4.5.2", "@vue/compiler-sfc": "3.3.11", - "astring": "1.8.6", "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6", + "astring": "1.8.6", "broadcast-channel": "6.0.0", "browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3", "buraha": "0.0.1", @@ -56,8 +56,8 @@ "punycode": "2.3.1", "rollup": "4.9.0", "sanitize-html": "2.11.0", - "shiki": "0.14.6", "sass": "1.69.5", + "shiki": "0.14.6", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", "three": "0.159.0", @@ -116,6 +116,7 @@ "eslint-plugin-vue": "9.19.2", "fast-glob": "3.3.2", "happy-dom": "10.0.3", + "intersection-observer": "0.12.2", "micromatch": "4.0.5", "msw": "1.3.2", "msw-storybook-addon": "1.10.0", diff --git a/packages/frontend/test/home.test.ts b/packages/frontend/test/home.test.ts index 6d38b7e52..094ea071b 100644 --- a/packages/frontend/test/home.test.ts +++ b/packages/frontend/test/home.test.ts @@ -3,13 +3,14 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { describe, test, assert, afterEach } from 'vitest'; -import { render, cleanup, type RenderResult } from '@testing-library/vue'; +import { afterEach, assert, describe, test } from 'vitest'; +import { cleanup, render, type RenderResult } from '@testing-library/vue'; import './init'; import type * as Misskey from 'misskey-js'; import { directives } from '@/directives/index.js'; import { components } from '@/components/index.js'; import XHome from '@/pages/user/home.vue'; +import 'intersection-observer'; describe('XHome', () => { const renderHome = (user: Partial): RenderResult => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c0bc470b..5319acf93 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -944,6 +944,9 @@ importers: happy-dom: specifier: 10.0.3 version: 10.0.3 + intersection-observer: + specifier: 0.12.2 + version: 0.12.2 micromatch: specifier: 4.0.5 version: 4.0.5 @@ -12996,6 +12999,10 @@ packages: side-channel: 1.0.4 dev: true + /intersection-observer@0.12.2: + resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} + dev: true + /invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} dependencies: