unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.96k stars 496 forks source link

Add testing utilities #2307

Closed MickL closed 6 months ago

MickL commented 6 months ago

Describe the feature

At least missing:

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

Additional information

pi0 commented 6 months ago

~> https://github.com/unjs/nitro/issues/2303

MickL commented 5 months ago

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

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 commented 5 months ago

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 commented 5 months ago

Sounds good! Possibly for v3?

johannschopplich commented 5 months ago

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