ianstormtaylor / superstruct

A simple and composable way to validate data in JavaScript (and TypeScript).
https://docs.superstructjs.org
MIT License
6.95k stars 224 forks source link

Migrate testing suite to Vitest #1242

Closed yeoffrey closed 2 months ago

yeoffrey commented 2 months ago

Closes: #1226

Description

This PR contains the changes nessessary to migrate the current testing suite, which is Mocha to Vitest. This is similar to ciscoheat's PR, except that it only contains Vitest changes.

Note: Vitest automatically finds tests by looking for filenames that end with .test.ts, so I've done this here. This should also help unblock #1224.

Next steps

I believe that the current way which the test suite gathers files from the file system is not ideal. I think theres a better way to organize these tests, but that should be in another PR.

arturmuller commented 2 months ago

Hey @yeoffrey -- this is lovely! ❤️

I agree that to make things feel more Vitest-y it should probably be organised differently. PRs on that front extremely welcome!

Merging...