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

Unit test all of our framework code #2221

Open
infomiho opened this issue Aug 1, 2024 · 1 comment
Open

Unit test all of our framework code #2221

infomiho opened this issue Aug 1, 2024 · 1 comment
Labels
ci Continuous integration testing

Comments

@infomiho
Copy link
Contributor

infomiho commented Aug 1, 2024

Right now, it's quite difficult to unit test Wasp's framework code because a lot of it is in Mustache templates. That's why we didn't immediately test it with unit tests when we wrote the code.

Unit tests in userland

The thinking now is that we can do this but in a bit of an indirect way: by building example apps that use the framework and we can then write unit tests for the publicly exposed functions in the user land.

Unit tests by copy-paste

Another approach we could do is just to copy paste unit tests in built projects and then running them. In this case, we would still have example apps for various scenarios - but we run the unit tests inside of .wasp/out folders i.e. by copy pasting them there and running something like npx vitest run.

@Martinsos
Copy link
Member

I am not sure if this can be called unit tests. Maybe integration tests? Not sure if that is correct either, but feels more correct. Or even e2e tests of a kind?

@sodic sodic added the testing label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration testing
Projects
None yet
Development

No branches or pull requests

3 participants