xddq / schema2typebox

Creating TypeBox code from JSON schemas
MIT License
54 stars 12 forks source link

refactor: break apart test suite and add "watch" support for test runner #25

Closed pdfowler closed 10 months ago

pdfowler commented 11 months ago

This PR is dependent on PR #24

Summary

While building PR #24, the test suite became a little crowded and was notably lacking a watch mode. This PR breaks apart the single test/index.ts file into three + a utility file for easier navigation and focus (IMO)

Checklist

Discussion & Open Questions

Watch mode

I'm on node v18 and implemented watch mode for the test suite inline with running in watch mode. v20 brings an integrated watch flag, but would require v20 to be the minimum library version. Nevermind, the --watch flag has been back ported to v18.13.0. I don't plan to update the nodemon config at this time, but it could be addressed in a followup PR

xddq commented 10 months ago

@pdfowler I followed your suggestion/approach and did split the tests into several files in the rewrite and refactor. Will keep a todo/note with adding watchmode for tests and probably implement this based on your suggestion as well.

Closing this, reopen if you see any issues with it