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 --vitest flag #58

Closed

Conversation

NullVoxPopuli
Copy link
Collaborator

Uses https://github.com/NullVoxPopuli/vitest-blueprint

This is for projects where they don't need a test app or maybe have node things to test outside of the test app.

Ember historically hasn't made a decision on node-testing convention, but I think this is pretty easy (no other node testing tool comes close to the ease of use here (at least that's been released in 3+ months ago)).

For example, @ember/string's v2-addon-conversion PR the ember app has been fully removed in favor of node-only tests (which vitest is good at (minimal config, works with ESM and TS out of the box))).
This is because the addon is really just a utility library with some functions and doesn't do anything ember-specific.
So v2 addons become a blueprint for rollup libraries, and not anything just ember specific.

tasks.push(
(async () => {
// lookupBlueprint (used above) does not lookup packages on npm
await execa(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should we do this same technique for the app as well?
it would allow us to add ember-cli-typescript for TS porjects.

@ef4
Copy link
Contributor

ef4 commented Aug 11, 2022

I think it's good that the blueprint you've made can compose after the addon blueprint so easily, and since it can I don't think it's worth adding to the API surface area of the our blueprint.

An alternative suggestion would be to create a general purpose hook that lets people shell out to their own arbitrary extra command at this place in the blueprint (avoiding the need for multiple NPM installs).

@ef4 ef4 closed this Aug 11, 2022
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