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 testing utilities #2307

Closed
1 task
MickL opened this issue Mar 24, 2024 · 5 comments
Closed
1 task

Add testing utilities #2307

MickL opened this issue Mar 24, 2024 · 5 comments

Comments

@MickL
Copy link
Contributor

MickL commented Mar 24, 2024

Describe the feature

At least missing:

  • Setup Nitro app
  • Provide fetch function
  • Mock utils

Something like this: https://github.com/johannschopplich/nitro-starter/blob/main/test/utils.ts

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Mar 25, 2024

~> #2303

@pi0 pi0 closed this as completed Mar 25, 2024
@MickL
Copy link
Contributor Author

MickL commented Apr 8, 2024

@pi0 Does this mean all tools for testing are existing but not documented?

  • Is there a function to setup the Nitro app for tests?
  • Are there fetch functions?
  • How can I mock something like database connection or auth sessions?

The first two I currently implemented myself by looking at this repository: https://github.com/johannschopplich/nitro-starter/tree/main/test thanks to @johannschopplich

@pi0
Copy link
Member

pi0 commented Apr 8, 2024

I have a plan to work on a branding new testing system for Nitro server which i need to better explain later once more shaped idea but in the meantime any setup that works for you. Setup function in shared repo seems nice 👍🏼

@MickL
Copy link
Contributor Author

MickL commented Apr 8, 2024

Sounds good! Possibly for v3?

@johannschopplich
Copy link
Contributor

For the record: I've built nitro-test-utils until the official utilities are ready. 🙂

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

No branches or pull requests

3 participants