Skip to content

api test refactoring move#61

Merged
eviltester merged 1 commit into
masterfrom
56-move-tests-to-apps
May 7, 2026
Merged

api test refactoring move#61
eviltester merged 1 commit into
masterfrom
56-move-tests-to-apps

Conversation

@eviltester

@eviltester eviltester commented May 7, 2026

Copy link
Copy Markdown
Owner

move the testing for the api into the api code folders

Summary by CodeRabbit

  • Chores
    • Restructured test infrastructure and configuration paths to streamline project organization and improve maintainability.

Copilot AI review requested due to automatic review settings May 7, 2026 13:06
@eviltester eviltester linked an issue May 7, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: df62052c-8ba9-457e-9430-6c83e42d2491

📥 Commits

Reviewing files that changed from the base of the PR and between 4abc006 and 32fe374.

📒 Files selected for processing (9)
  • apps/api/src/tests/README.md
  • apps/api/src/tests/api-test-setup.js
  • apps/api/src/tests/fromschema/v1-fromschema.spec.js
  • apps/api/src/tests/generate/v1-generate.spec.js
  • apps/api/src/tests/global-setup.js
  • apps/api/src/tests/global-teardown.js
  • apps/api/src/tests/health/health-endpoints.spec.js
  • apps/api/src/tests/options/options-endpoints.spec.js
  • playwright-api.config.js

📝 Walkthrough

Walkthrough

This PR relocates API tests from a standalone ./tests/api directory to a colocated structure under ./apps/api/src/tests. The Playwright configuration and test setup import paths are updated to reflect the new directory structure, simplifying relative path references.

Changes

API Test Directory Relocation

Layer / File(s) Summary
Test Configuration
playwright-api.config.js
Top-level testDir, projects[0].testDir, globalSetup, and globalTeardown paths updated from ./tests/api to ./apps/api/src/tests.
Test Setup Import
apps/api/src/tests/api-test-setup.js
Import path for API entry module simplified from ../../apps/api/src/index.js to ../index.js due to test relocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A hop, a skip, some paths rearranged,
From scattered tests to structure changed,
Import paths dance, now tidy and near,
Tests find their home, crystal clear. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'api test refactoring move' is vague and generic, using non-descriptive terms that don't clearly convey the primary change or intent of the PR. Consider a more descriptive title like 'Move API tests to apps/api/src/tests directory' to clearly indicate the structural reorganization being performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 56-move-tests-to-apps

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Moves Playwright API tests to live alongside the API source code and updates configuration/setup paths accordingly.

Changes:

  • Update Playwright config to run tests from apps/api/src/tests (including global setup/teardown).
  • Adjust API test setup import path to reference API entrypoint via a shorter relative path.

Reviewed changes

Copilot reviewed 2 out of 9 changed files in this pull request and generated 2 comments.

File Description
tests/api/api-test-setup.js Updates dynamic import path for starting the API server in tests.
playwright-api.config.js Points Playwright’s testDir and global setup/teardown to apps/api/src/tests.

Comment thread playwright-api.config.js
Comment thread playwright-api.config.js
@eviltester eviltester merged commit 40128ec into master May 7, 2026
8 of 9 checks passed
@eviltester eviltester deleted the 56-move-tests-to-apps branch May 7, 2026 13:13
This was referenced May 7, 2026
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.

move tests to apps

2 participants