Skip to content

feat: Add backend tests and developer documentation #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

870301074
Copy link

This commit introduces several improvements:

  1. Backend Unit Tests:

    • Added comprehensive unit tests for the AppUsecase in backend/usecase/app.go.
    • Refactored AppUsecase and related components to use interfaces for improved dependency injection and testability.
    • Mocks for AppRepository and NodeUsecase were created to facilitate isolated testing.
  2. Developer Documentation:

    • Created a new DEVELOPERS.md file in the root directory.
    • This file provides an overview of the project architecture, codebase structure, guidance on setting up the development environment, and contribution guidelines.
  3. Frontend Testing (Partial):

    • Initiated the setup of Vitest for the web/admin frontend application.
    • Added basic tests for some components (e.g., Header, Card).
    • Testing for UploadFile/Drag.tsx was attempted but encountered persistent timeouts in the JSDOM environment; these tests have been temporarily skipped.
    • Further frontend testing was paused due to broader test environment instability.

This work aims to improve the robustness and maintainability of the backend and make it easier for new developers to contribute to the PandaWiki project.

This commit introduces several improvements:

1.  **Backend Unit Tests:**
    *   Added comprehensive unit tests for the `AppUsecase` in `backend/usecase/app.go`.
    *   Refactored `AppUsecase` and related components to use interfaces for improved dependency injection and testability.
    *   Mocks for `AppRepository` and `NodeUsecase` were created to facilitate isolated testing.

2.  **Developer Documentation:**
    *   Created a new `DEVELOPERS.md` file in the root directory.
    *   This file provides an overview of the project architecture, codebase structure, guidance on setting up the development environment, and contribution guidelines.

3.  **Frontend Testing (Partial):**
    *   Initiated the setup of Vitest for the `web/admin` frontend application.
    *   Added basic tests for some components (e.g., `Header`, `Card`).
    *   Testing for `UploadFile/Drag.tsx` was attempted but encountered persistent timeouts in the JSDOM environment; these tests have been temporarily skipped.
    *   Further frontend testing was paused due to broader test environment instability.

This work aims to improve the robustness and maintainability of the backend and make it easier for new developers to contribute to the PandaWiki project.
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.

1 participant