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

[Epic] Integrate with the CLI for running tests #299

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Siddhant-K-code
Copy link
Contributor

Description

Integrate CLI for running tests and suggest autofixes for failing tests using npm script (added docs too)

References

fixes #266

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

* **package.json**
  - Add a new script command "test-inline" to run tests and display output inline
  - Update the "test" script to include the new command

* **client/src/test/diagnostics.test.ts**
  - Implement autofix suggestions for failing tests
  - Add comments to explain the autofix logic

* **client/src/test/extension.test.ts**
  - Implement autofix suggestions for failing tests
  - Add comments to explain the autofix logic

* **README.md**
  - Add instructions on running tests through the CLI and viewing output inline
  - Update the usage section to include the new feature
@Siddhant-K-code Siddhant-K-code requested review from a team as code owners September 14, 2024 08:28
@Siddhant-K-code Siddhant-K-code changed the title Integrate with the CLI for running tests [Epic] Integrate with the CLI for running tests Sep 14, 2024
@ewanharris
Copy link
Member

👋🏻 Thanks for the PR @Siddhant-K-code! Apologies for this but I think our issue might not have been clear enough on what we're looking to achieve. I'll work to update the GH issue to reflect this better.

The FGA CLI supports running tests defined in the store file, and that's what we'd like to expose to FGA developers in some manner. I think a first pass would be to have this ran via a command in the command palette and then later some deeper integration with the VS Code testing panel and inline items (I think there's a barrier to this in that the CLI doesn't support running specific tests or a "simple" parseable output)

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.

Integrate with the CLI for running tests
2 participants