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

Improvements to components:dev:test #4

Merged
merged 2 commits into from Oct 25, 2022

Conversation

taylorreece
Copy link
Member

This commit adds two additional features to prism components:dev:test:

  • An npm run build is now automatically issued when the subcommand is run. It's far to easy to forget to build prior to testing. This ensures that you build before running a test. You can opt out of the build behavior with --no-build.
  • You can now choose to write the results of your action's step to a file. If your action returns a JSON-serializable object, it's serialized to JSON and written out. If it returns a string, that string is written out. If it returns a Buffer or a binary file (png, pdf, etc), those are also written out properly. This lets you verify quickly that your action returns the structure of data that you'd expect it to. You can choose to write out step result data with the flag --output-file my-file.png (replacing the file name with whatever makes sense for you).

Additionally, some functionality (like spawning child processes or fetching step results) were abstracted into utility functions so multiple subcommands could use them.

Copy link
Member

@hipplej hipplej left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@ryanwersal ryanwersal left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks!

src/commands/components/dev/test.ts Outdated Show resolved Hide resolved
@taylorreece taylorreece merged commit 257e6c7 into main Oct 25, 2022
@ryanwersal ryanwersal deleted the tr/improvements-to-components-dev-test branch April 13, 2023 18:15
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.

None yet

3 participants