Skip to content

feat: RSS-CORE-00 video and testing - #42

Merged
FierceSloth merged 3 commits into
developfrom
feature/videoAndTesting
Jul 13, 2026
Merged

FierceSloth merged 3 commits into
developfrom
feature/videoAndTesting

Conversation

@FierceSloth

@FierceSloth FierceSloth commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

📋 Trello Task ID

  • RSS-SE-## (Task ID / Trello Card)
  • No ID (Epic merge: feature/videoAndTesting → develop)

⚡️ Summary

Merge the Video & Testing epic into develop. This includes setting up the testing environment with Vitest and React Testing Library, and writing comprehensive unit and integration tests across the application to achieve high code coverage (>95%). Tests cover the authentication flow, form validation, Swagger Editor and Viewer logic, proxy server, and header navigation.

Included stories:

  • RSS-SE-30 — setup tests and cover auth flow
  • RSS-SE-31 — cover editor viewer with tests

🛠 Type of change

  • feat (New feature)
  • fix (Bug fix)
  • refactor (Code improvement / Refactoring without changing logic)
  • style (Formatting, CSS)
  • docs (Documentation)
  • chore (Configs, Build)
  • test (Testing)

Summary by CodeRabbit

  • Тесты
    • Расширено покрытие прокси-запросов, аутентификации, Supabase и middleware.
    • Добавлены проверки редактора OpenAPI, просмотра схем, списка эндпоинтов и формы «Попробовать».
    • Покрыты генерация URL, заголовков, примеров, cURL-команд и форматирование ответов.
    • Добавлены проверки отображения публичной и защищённой навигации.
  • Рефакторинг
    • Улучшена типизация результата регистрации и структура проверки схем.
  • Конфигурация
    • Настроены исключения для покрытия и тестовые окружения.

- Configure Vitest environment and coverage exclusions
- Cover authentication flow with unit and integration tests
- Verify form validations, server actions, and middleware redirects
- Add unit tests for Swagger Editor and Viewer components
- Cover try-it-out form and curl command generation with tests
- Implement testing for Proxy API and SSR routing
- Refactor codemirror-linter and add validation logic tests
- Achieve over 92% overall code coverage
@vercel

vercel Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
swagger-editor-app Ready Ready Preview, Comment Jul 13, 2026 4:49pm

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Добавлены тесты для proxy API, OpenAPI endpoint-компонентов, Try It Out, аутентификации, Supabase, CodeMirror linter и UI. Также обновлены настройки Vitest и тип возвращаемого значения signUp.

Changes

Тестовое покрытие приложения

Layer / File(s) Summary
Тестовая инфраструктура и UI-компоненты
vitest.config.ts, vitest.setup.ts, src/widgets/..., src/shared/ui/input/*
Настроены окружение и моки Vitest; добавлены тесты Header, SwaggerEditor и SwaggerViewer.
Proxy API
app/api/proxy/*
Проверены фильтрация заголовков, валидация URL, успешные методы прокси и обработка ошибок.
Endpoint и Try It Out
src/entities/endpoint/...
Проверены генерация примеров, группировка параметров, отображение endpoint-данных, построение запросов, форматирование ответов и cURL.
Аутентификация
src/features/auth/...
Проверены формы входа и регистрации, server actions и обновление состояния AuthProvider; уточнён тип результата signUp.
Валидатор схем
src/features/schema-validator/...
Добавлен экспортируемый runOpenapiLinter и тесты преобразования диагностик.
Supabase
src/shared/api/supabase/...
Проверены browser/server-клиенты, текущий пользователь, middleware, редиректы и cookie-операции.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers: dilmun1101, lexarudak

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Название слишком общее и не отражает конкретно добавление тестов и настройку Vitest. Сделайте заголовок более конкретным, например: «feat: add Vitest setup and tests for auth, proxy, Swagger and forms».
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed Описание в целом соответствует шаблону: есть ID, summary и тип изменения, а раздел скриншотов можно не добавлять без UI-изменений.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/videoAndTesting

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
src/shared/api/supabase/server.test.ts (1)

16-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Общий мок mockCookieStore не сбрасывается между тестами полностью.

vi.clearAllMocks() в beforeEach очищает только историю вызовов, но не удаляет пользовательские реализации, заданные через mockImplementation/mockReturnValue. Тест на Line 55-57 задаёт mockCookieStore.set бросающим исключение, а тест на Line 37 задаёт mockCookieStore.getAll с кастомным возвратом — оба изменения переживут clearAllMocks() и «утекут» в любой добавленный впоследствии тест, вызывая непредсказуемые падения. Сейчас проблема не проявляется только потому, что это последние использования моков в файле.

♻️ Предлагаемое исправление
   beforeEach(() => {
-    vi.clearAllMocks();
+    vi.resetAllMocks();
     vi.mocked(cookies).mockResolvedValue(mockCookieStore as any);
   });

Also applies to: 46-62

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/api/supabase/server.test.ts` around lines 16 - 24, Reset mock
implementations as well as call history in the beforeEach for mockCookieStore,
replacing vi.clearAllMocks() with the appropriate full mock reset. Ensure
cookies, mockCookieStore.getAll, and mockCookieStore.set start each test with
their default behavior so custom implementations from individual tests cannot
leak.
src/features/auth-form/ui/auth-form.test.tsx (1)

108-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Отсутствует тест на отображение серверной ошибки для режима регистрации.

Для Login-режима есть тест should display server error if signInWithPassword fails (строки 93-105), но для Register-режима аналогичного теста на ошибку signUp нет — покрытие несимметрично, хотя оба флоу используют одинаковый механизм отображения serverError через t(\errors.${result.error}`)(см.src/features/auth-form/ui/auth-form.tsx:47-51`).

♻️ Предлагаемый тест
     it('should call signUp on successful submit', async () => {
       ...
     });
+
+    it('should display server error if signUp fails', async () => {
+      const user = userEvent.setup();
+      vi.mocked(signUp).mockResolvedValue({ error: 'userAlreadyExists' });
+
+      render(<AuthForm variant="register" />);
+
+      await user.type(screen.getByLabelText('Register.emailLabel'), 'test@domain.com');
+      await user.type(screen.getByLabelText('Register.passcodeLabel'), 'ValidPass123!');
+      await user.type(screen.getByLabelText('Register.confirmPasscodeLabel'), 'ValidPass123!');
+
+      await user.click(screen.getByRole('button', { name: /Register.submitButton/i }));
+
+      expect(await screen.findByText('Register.errors.userAlreadyExists')).toBeInTheDocument();
+    });
   });
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/auth-form/ui/auth-form.test.tsx` around lines 108 - 146, Add a
Register Mode test alongside the existing successful-submit test that mocks
signUp to return a failure result, submits valid registration credentials, and
asserts the translated server error is rendered via the existing error-message
mechanism. Reuse the same symbols and setup as the Login server-error test and
preserve the current success-path coverage.
src/entities/endpoint/ui/try-it-out-form/try-it-out-form.test.tsx (1)

71-103: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Не проверяется передача заголовка X-Token в запросе.

В тесте заполняется поле X-Token (header) (строка 85), но assertion на вызов fetchViaProxy (строки 90-96) проверяет только method и body, игнорируя headers. Часть покрытия для передачи кастомных заголовков через форму фактически не проверяется этим тестом.

Пример дополнения проверки
       expect(fetchViaProxy).toHaveBeenCalledWith(
         'https://api.example.com/users/123?q=search',
         expect.objectContaining({
           method: 'POST',
           body: JSON.stringify({ name: 'Alice' }, null, 2),
+          headers: expect.objectContaining({ 'X-Token': 'secret' }),
         })
       );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entities/endpoint/ui/try-it-out-form/try-it-out-form.test.tsx` around
lines 71 - 103, Расширьте assertion на вызов fetchViaProxy в тесте “should
submit the form successfully and render the response details”, добавив проверку
headers с переданным значением X-Token: secret. Сохраните существующие проверки
URL, method и body без изменений.
src/entities/endpoint/ui/try-it-out-form/build-headers.test.ts (1)

15-27: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Не покрыта ветка if (value) в buildHeaders.

Оба теста используют непустые значения в FormData, поэтому ветка пропуска установки заголовка при falsy-значении (getFormStringValue вернул пустую строку) не проверяется.

♻️ Предлагаемый дополнительный тест-кейс
   it('should filter and set headers from form parameters', () => {
     const parameters: IOpenApiParameter[] = [
       { name: 'X-Test-Header', in: 'header', required: false, schema: { type: 'string' } },
       { name: 'query-param', in: 'query', required: false, schema: { type: 'string' } },
     ];
     const formData = new FormData();
     formData.append('header:X-Test-Header', 'hello');
     formData.append('query:query-param', 'world');

     const headers = buildHeaders({ parameters, formData });
     expect(headers.get('X-Test-Header')).toBe('hello');
     expect(headers.get('query-param')).toBeNull();
   });
+
+  it('should skip setting header when value is empty', () => {
+    const parameters: IOpenApiParameter[] = [
+      { name: 'X-Empty-Header', in: 'header', required: false, schema: { type: 'string' } },
+    ];
+    const formData = new FormData();
+    formData.append('header:X-Empty-Header', '');
+
+    const headers = buildHeaders({ parameters, formData });
+    expect(headers.has('X-Empty-Header')).toBe(false);
+  });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entities/endpoint/ui/try-it-out-form/build-headers.test.ts` around lines
15 - 27, Extend the buildHeaders test coverage to include a header form
parameter whose FormData value is an empty string, then assert that no header is
set for it. Keep the existing non-empty header and non-header parameter
assertions unchanged.
src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx (1)

1-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Дублирование хелпера renderWithTranslations в трёх тестовых файлах.

Идентичный код (импорт messages/en.json + обёртка NextIntlClientProvider) повторяется без изменений в трёх файлах. Общий корень — отсутствие общего test-utils хелпера для i18n-рендеринга.

  • src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx#L1-L14: заменить локальный renderWithTranslations на импорт из общего test-utils модуля.
  • src/entities/endpoint/ui/request-body/request-body.test.tsx#L1-L14: то же самое.
  • src/entities/endpoint/ui/response-list/response-list.test.tsx#L1-L15: то же самое.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx` around lines 1
- 14, Создайте общий test-utils хелпер для i18n-рендеринга, инкапсулирующий
messages/en.json и NextIntlClientProvider, затем замените локальные
renderWithTranslations в
src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx#L1-L14,
src/entities/endpoint/ui/request-body/request-body.test.tsx#L1-L14 и
src/entities/endpoint/ui/response-list/response-list.test.tsx#L1-L15 импортом
общего хелпера и удалите дублирующиеся импорты и реализации.
vitest.config.ts (2)

14-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

coverage.exclude полностью заменяет дефолтные исключения Vitest.

Документация Vitest явно указывает: coverage.exclude перезаписывает встроенный список исключений, а не расширяет его. В v4 риск невелик, так как в отчёт по умолчанию попадают только реально импортированные файлы (coverage.include не задан) и паттерны тестовых файлов добавляются автоматически, но остальные встроенные исключения (например, **/*.d.ts, служебные конфиги других инструментов) теряются. Рекомендуется расширять дефолтный список через coverageConfigDefaults.exclude, чтобы не потерять эти исключения при будущих изменениях (новые конфиги/инструменты, .d.ts-файлы, попавшие в граф импортов).

♻️ Предлагаемый рефакторинг
+import { coverageConfigDefaults } from 'vitest/config';
+
       coverage: {
         provider: 'v8',
         reporter: ['text', 'json', 'html'],
         exclude: [
-          'node_modules/**',
-          '.next/**',
-          'coverage/**',
           'vitest.config.ts',
           'vitest.setup.ts',
           'next.config.ts',
           'proxy.ts',
           '**/index.ts',
           '**/*.module.scss',
           '**/*.scss',
+          ...coverageConfigDefaults.exclude,
         ],
       },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vitest.config.ts` around lines 14 - 25, Update the coverage configuration in
vitest.config.ts to extend Vitest’s built-in exclusions via
coverageConfigDefaults.exclude instead of replacing them with a standalone
exclude array. Preserve all existing project-specific patterns while retaining
default exclusions such as declaration files and tool configuration files.

37-37: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Алиас server-only указывает на vitest.setup.ts — смешивает два несвязанных назначения одного файла.

Технически рабочее решение (модуль кэшируется один раз, так как vitest.setup.ts уже загружен через setupFiles), но использование тестового setup-файла как заглушки для стороннего пакета server-only снижает читаемость конфигурации: последующий разработчик, дополняя vitest.setup.ts реальной логикой инициализации, рискует незаметно повлиять на разрешение импорта server-only. Отдельный пустой stub-модуль был бы более явным.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vitest.config.ts` at line 37, Разделите назначения алиаса server-only и файла
vitest.setup.ts: создайте отдельный пустой stub-модуль для подмены server-only и
укажите его в конфигурации Vitest вместо vitest.setup.ts, сохранив
vitest.setup.ts только в setupFiles.
vitest.setup.ts (1)

16-36: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Мок @uiw/react-codemirror выглядит корректно.

onChange/onUpdate эмулируют реальное поведение достаточно для нужд тестов (диагностика через forEachDiagnostic мокается отдельно в swagger-editor.test.tsx). Замечу лишь, что реальный onChange в @uiw/react-codemirror передаёт также ViewUpdate вторым аргументом — сейчас мок его не передаёт; текущим тестам это не мешает, но может ограничить будущие тест-кейсы, которым понадобится второй аргумент.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vitest.setup.ts` around lines 16 - 36, Extend the mocked CodeMirror onChange
invocation in the default mock component to provide the expected second
ViewUpdate argument, while preserving the existing value propagation and
onUpdate behavior. Use the existing update object shape or a compatible mock
value so future tests can consume the second argument.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/features/schema-validator/lib/codemirror-linter.test.ts`:
- Around line 1-6: Ensure every test creating an EditorView in the
codemirror-linter test suite destroys it after execution. Add afterEach cleanup
or try/finally around the relevant tests, tracking each view and calling its
destroy() method so DOM handlers and observers are released.

---

Nitpick comments:
In `@src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx`:
- Around line 1-14: Создайте общий test-utils хелпер для i18n-рендеринга,
инкапсулирующий messages/en.json и NextIntlClientProvider, затем замените
локальные renderWithTranslations в
src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx#L1-L14,
src/entities/endpoint/ui/request-body/request-body.test.tsx#L1-L14 и
src/entities/endpoint/ui/response-list/response-list.test.tsx#L1-L15 импортом
общего хелпера и удалите дублирующиеся импорты и реализации.

In `@src/entities/endpoint/ui/try-it-out-form/build-headers.test.ts`:
- Around line 15-27: Extend the buildHeaders test coverage to include a header
form parameter whose FormData value is an empty string, then assert that no
header is set for it. Keep the existing non-empty header and non-header
parameter assertions unchanged.

In `@src/entities/endpoint/ui/try-it-out-form/try-it-out-form.test.tsx`:
- Around line 71-103: Расширьте assertion на вызов fetchViaProxy в тесте “should
submit the form successfully and render the response details”, добавив проверку
headers с переданным значением X-Token: secret. Сохраните существующие проверки
URL, method и body без изменений.

In `@src/features/auth-form/ui/auth-form.test.tsx`:
- Around line 108-146: Add a Register Mode test alongside the existing
successful-submit test that mocks signUp to return a failure result, submits
valid registration credentials, and asserts the translated server error is
rendered via the existing error-message mechanism. Reuse the same symbols and
setup as the Login server-error test and preserve the current success-path
coverage.

In `@src/shared/api/supabase/server.test.ts`:
- Around line 16-24: Reset mock implementations as well as call history in the
beforeEach for mockCookieStore, replacing vi.clearAllMocks() with the
appropriate full mock reset. Ensure cookies, mockCookieStore.getAll, and
mockCookieStore.set start each test with their default behavior so custom
implementations from individual tests cannot leak.

In `@vitest.config.ts`:
- Around line 14-25: Update the coverage configuration in vitest.config.ts to
extend Vitest’s built-in exclusions via coverageConfigDefaults.exclude instead
of replacing them with a standalone exclude array. Preserve all existing
project-specific patterns while retaining default exclusions such as declaration
files and tool configuration files.
- Line 37: Разделите назначения алиаса server-only и файла vitest.setup.ts:
создайте отдельный пустой stub-модуль для подмены server-only и укажите его в
конфигурации Vitest вместо vitest.setup.ts, сохранив vitest.setup.ts только в
setupFiles.

In `@vitest.setup.ts`:
- Around line 16-36: Extend the mocked CodeMirror onChange invocation in the
default mock component to provide the expected second ViewUpdate argument, while
preserving the existing value propagation and onUpdate behavior. Use the
existing update object shape or a compatible mock value so future tests can
consume the second argument.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 102801f0-179d-4395-834f-42efe588603f

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc9a7 and b3c820b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (31)
  • app/api/proxy/getProxyHeaders.test.ts
  • app/api/proxy/route.test.ts
  • src/entities/endpoint/lib/generate-example.test.ts
  • src/entities/endpoint/lib/group-endpoints.test.ts
  • src/entities/endpoint/ui/endpoint-list/endpoint-list.test.tsx
  • src/entities/endpoint/ui/method-badge/method-badge.test.tsx
  • src/entities/endpoint/ui/request-body/request-body.test.tsx
  • src/entities/endpoint/ui/response-list/response-list.test.tsx
  • src/entities/endpoint/ui/try-it-out-form/build-headers.test.ts
  • src/entities/endpoint/ui/try-it-out-form/build-url.test.ts
  • src/entities/endpoint/ui/try-it-out-form/format-response-body.test.ts
  • src/entities/endpoint/ui/try-it-out-form/generate-curl-command.test.ts
  • src/entities/endpoint/ui/try-it-out-form/get-form-string-value.test.ts
  • src/entities/endpoint/ui/try-it-out-form/get-parameter-field-name.test.ts
  • src/entities/endpoint/ui/try-it-out-form/try-it-out-form.test.tsx
  • src/features/auth-form/ui/auth-form.test.tsx
  • src/features/auth/model/action.test.ts
  • src/features/auth/model/action.ts
  • src/features/auth/model/auth-provider.test.tsx
  • src/features/schema-validator/lib/codemirror-linter.test.ts
  • src/features/schema-validator/lib/codemirror-linter.ts
  • src/shared/api/supabase/client.test.ts
  • src/shared/api/supabase/get-current-user.test.ts
  • src/shared/api/supabase/middleware.test.ts
  • src/shared/api/supabase/server.test.ts
  • src/shared/ui/input/input.module.scss
  • src/widgets/header/ui/header.test.tsx
  • src/widgets/swagger-editor/ui/swagger-editor.test.tsx
  • src/widgets/swagger-viewer/ui/swagger-viewer.test.tsx
  • vitest.config.ts
  • vitest.setup.ts

Comment on lines +1 to +6
import { describe, it, expect, vi } from 'vitest';
import { runOpenapiLinter } from './codemirror-linter';
import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { validateSchema } from './validate-schema';
import { DiagnosticSeverity } from '@stoplight/types';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the test file and any global test teardown/setup that might already destroy views.
git ls-files | rg 'src/features/schema-validator/lib/codemirror-linter\.test\.ts|vitest|setup|teardown|test'

echo
echo '--- file outline ---'
ast-grep outline src/features/schema-validator/lib/codemirror-linter.test.ts --view expanded

echo
echo '--- file contents (numbered) ---'
cat -n src/features/schema-validator/lib/codemirror-linter.test.ts

echo
echo '--- search for destroy() / afterEach around EditorView in tests ---'
rg -n "destroy\(\)|afterEach\(|EditorView" src/features/schema-validator -g '!**/dist/**' -g '!**/build/**'

echo
echo '--- search for global test setup ---'
rg -n "setupFiles|setup\.ts|setupTests|afterEach|beforeEach" . -g 'vitest.config.*' -g 'vite.config.*' -g 'src/**' -g '!**/dist/**' -g '!**/build/**'

Repository: FierceSloth/swagger-editor-app

Length of output: 7176


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- vitest.setup.ts ---'
cat -n vitest.setup.ts

echo
echo '--- vitest.config.ts ---'
cat -n vitest.config.ts

echo
echo '--- schema linter implementation ---'
cat -n src/features/schema-validator/lib/codemirror-linter.ts

Repository: FierceSloth/swagger-editor-app

Length of output: 4604


Освобождайте EditorView после каждого теста

Оба теста создают EditorView, но не вызывают destroy(). Добавьте afterEach или try/finally, чтобы не оставлять DOM-обработчики и внутренние наблюдатели между тестами.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/schema-validator/lib/codemirror-linter.test.ts` around lines 1 -
6, Ensure every test creating an EditorView in the codemirror-linter test suite
destroys it after execution. Add afterEach cleanup or try/finally around the
relevant tests, tracking each view and calling its destroy() method so DOM
handlers and observers are released.

@FierceSloth
FierceSloth merged commit c9cf67e into develop Jul 13, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — b3c820b6 Deployed Jul 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants