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

Simplify testing suite with Vitest #1244

Open yeoffrey opened 2 months ago

yeoffrey commented 2 months ago

TL;DR

The current testing suite is overly complicated. Since we've moved over to Vitest (see: #1242), we should now that package to its full potential, and simplify the testing suite all together for this project.

More Detail

Currently the testing suite basically has a "runner" which is in index.test.ts which handles all the tests in the testing suite. It imports configurations from /validation which will then be imported with the runner and it will execute tests.

The problem here is that is super complex. It also feels like a blackbox a bit because its not super readable and its not very strict. Now that we are using Vitest, I think theres a great opportunity to make this easier to understand and also more reliable.

Goals