Skip to content

Setup test environment #19

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

Closed
AugustinMauroy opened this issue Jun 5, 2024 · 5 comments
Closed

Setup test environment #19

AugustinMauroy opened this issue Jun 5, 2024 · 5 comments

Comments

@AugustinMauroy
Copy link
Member

Setting up a test environment would allow each function to be tested individually in order to ensure stability throughout the project.

To do this, I suggest using vitest, which is faster and more stable than jest. And it wraps the environment for Preact.

Should we use nodejs test-runner? Honestly, I think not, because if we have to test web components with tailwind and css module and typescript, it gets really complicated with nodejs test-runner.

We'll also need to set up GitHub actions to retrieve the test coverage.

@AugustinMauroy
Copy link
Member Author

@ovflowd can I have your opinion ?

@ovflowd
Copy link
Member

ovflowd commented Jun 17, 2024

I need clarification ont this yet. After we accomplish the initial migration parts, we can add unit testing. But should we also have end-to-end testing? Like a sample doc, we grab from node/node to test against? 🤔

I think it'd make sense to compile a list of what we want to test

@AugustinMauroy
Copy link
Member Author

AugustinMauroy commented Jun 17, 2024

For me we need these tests:

  • unit test for the parse, to unsure it's parse as expect. it would tend towards a spec
  • unit test if we have preact component here
  • Test run by hand or trigger on GitHub action which fetches the docs on node core main branch to test everything. So kind E2E testing

So my advice would be to set up the test environment before migrating anything from nodejs/nodejs.dev.

@flakey5
Copy link
Member

flakey5 commented Jun 25, 2024

I'm +1 on adding the tests when we need them (i.e. in the same pr for #2 or one after). Before then I don't really see how it'd help

@ovflowd
Copy link
Member

ovflowd commented Aug 5, 2024

Feel free to add tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants