Skip to content
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

Add smoke tests for CLI #85

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Conversation

hoshinotsuyoshi
Copy link
Member

@hoshinotsuyoshi hoshinotsuyoshi commented Nov 12, 2024

Summary

Add smoke tests for CLI

  • Introduced smoke.test.ts to verify that the CLI tool can run essential commands without errors.
  • Includes tests for basic CLI usage and ERD command execution, checking for expected output.

Related Issue

N/A

Changes

Testing:

  • Added smoke.test.ts under frontend/packages/cli/src/cli/ to perform end-to-end checks on the CLI.
  • The tests ensure that:
    • The help command outputs the expected usage information.
    • The erd build command runs successfully, generating the required output.

Test Setup:

  • The beforeAll hook prepares the environment by cleaning up and building the CLI tool.
  • Each test case uses node:child_process to execute CLI commands and verifies the output using vitest.

Testing

N/A

Other Information

N/A

@hoshinotsuyoshi hoshinotsuyoshi self-assigned this Nov 12, 2024
Base automatically changed from setup-erd-generator-cli-test to main November 13, 2024 06:15
@hoshinotsuyoshi hoshinotsuyoshi force-pushed the setup-erd-generator-cli-test-smoke branch from 841863b to 456af07 Compare November 13, 2024 11:39
@hoshinotsuyoshi hoshinotsuyoshi changed the base branch from main to feat/db-structure-to-react-flow-nodes November 13, 2024 11:40
- Introduced `smoke.test.ts` to verify that the CLI tool can run essential commands without errors.
- Includes tests for basic CLI usage and ERD command execution, checking for expected output.
@hoshinotsuyoshi hoshinotsuyoshi force-pushed the setup-erd-generator-cli-test-smoke branch from 456af07 to 5ec7fe0 Compare November 13, 2024 12:10
@hoshinotsuyoshi hoshinotsuyoshi changed the title Setup erd generator cli test smoke Add smoke tests for CLI Nov 13, 2024
@hoshinotsuyoshi hoshinotsuyoshi marked this pull request as ready for review November 13, 2024 12:22
@hoshinotsuyoshi hoshinotsuyoshi requested a review from a team as a code owner November 13, 2024 12:22
@hoshinotsuyoshi hoshinotsuyoshi requested review from FunamaYukina, junkisai, MH4GF and sasamuku and removed request for a team November 13, 2024 12:22
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

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

thanks 😄
I wrote a bit of comment.

frontend/packages/cli/src/cli/smoke.test.ts Show resolved Hide resolved
Replaced `toEqual` with `toMatchInlineSnapshot` in the CLI smoke test to simplify snapshot management and improve readability of the output comparison.
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

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

nice work 🚀

Base automatically changed from feat/db-structure-to-react-flow-nodes to main November 14, 2024 07:31
@hoshinotsuyoshi hoshinotsuyoshi added this pull request to the merge queue Nov 14, 2024
Merged via the queue into main with commit a2ba299 Nov 14, 2024
7 checks passed
@hoshinotsuyoshi hoshinotsuyoshi deleted the setup-erd-generator-cli-test-smoke branch November 14, 2024 07:36
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